Forum Replies Created
-
I see now that there is no hook called my_page_nav() like there is for posts.
Does anyone know how to get this plug in to work with Graphene?
In reply to: Next/Previous Post Link Plus (Ambrosite) Plug In making post disappear
October 4, 2011 at 2:52 pm #16830Anyone?
Well honestly I’m sort of confused about this.
Ok so Im using Share This plug in for it.
In the graphene options for social sharing icons tab I have this
<span class="st_fblike" style="float: right;"></span><br><br>
<span class="st_facebook"></span>
<span class="st_twitter"></span>
<span class="st_linkedin"></span>
<span class="st_stumbleupon"></span>
<span class="st_email" ></span>
<span class="st_sharethis"></span>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
stLight.options({
publisher:'wp.48f508c4-0b75-4c89-a79f-1d00814f82e7'
});
</script>But I’m not sure that controls the bottom part…that seems different than the ones in the top right, right?
Although I do have the boxes checked for “show on pages” and “show both top and bottom”/
Then in the share this settings page in the dashboard, I’ve got it set for vertical count buttons, show on posts but not on pages. Because it was showing up in the excerpts on the home page slider which I still have to solve also. I DO want them at the bottom of pages. I DONT want them to show up in the home page slider box.
Ya that would do it but I want a more stable permanent solution since I’ll be making hundreds of these pages. I just wanted to permanently get the share icons down in their own div. Like maybe a clear div then a float left for those or something.
@josh-
You are so good at css.
Any idea how to make the social media icons at the bottom always be at the bottom in one row, clearing the photo are? Once those pages have more content it will push them down but I’d love to make sure they are never all stacked up like this…
http://juicytravels.com/the-ten-best-airline-experiences-now-3/
And force them to all be in one row after the content, floated to left side I guess, or centered.
Thanks 🙂
Now I have:
function my_page_nav(){
// this will allow us to use other hooks but still only show on single posts
if ( is_single() && ! is_page() ) : ?>
<div id="my-page-nav"> <!-- div to contain your links -->
?>
<?php previous_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Previous page',
'in_same_parent' => true,
) );?> |
<?php next_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Next page',
'in_same_parent' => true,
) );?>
<?php endif;
}But still not right 🙂
Anyone able to help me tweak it into place?
So now on my child functions file I added the bit to the end
<?php previous_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Previous page',
'in_same_parent' => true,
) );?> |
<?php next_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Next page',
'in_same_parent' => true,
) );?>So I now have:
<?php
function graphene_slider_post_types(){
return array('post', 'page');
}
add_filter( 'graphene_slider_post_type', 'graphene_slider_post_types' );
// attaches the function my_post_nav to the hook graphene_post_nav
add_action ('graphene_after_post_content', 'my_post_nav');
// our function
function my_post_nav(){
// this will allow us to use other hooks but still only show on single posts
if ( is_single() && ! is_page() ) : ?>
<div id="my-post-nav"> <!-- div to contain your links -->
<?php previous_post_link_plus( array(
'order_by' => 'menu_order',
'loop' => false,
'max_length' => 0,
'tooltip' => 'Previous page',
'in_same_cat' => true,
'ex_cats' => '12'
) );?> |
<?php next_post_link_plus( array(
'order_by' => 'menu_order',
'loop' => false,
'max_length' => 0,
'tooltip' => 'Next page',
'in_same_cat' => true,
'ex_cats' => '12'
) );?>
</div>
<?php endif;
}
/******
* these next two remove the graphene breadcrumb and then add one
* which does not appear on the home page
*****/
// has to be called after the action is added
add_action ('after_setup_theme', 'wmrt_remove_graphene_bc');
function wmrt_remove_graphene_bc() {
remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
}
add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');
function wmrt_breadcrumb_navxt () {
//by calling this at this point is_home() works!
if ((function_exists('bcn_display')) && (!(is_front_page()))) {
echo '<div class="breadcrumb">';
bcn_display();
echo '</div>';
}
}
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'View full post' => 'Read More',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>
<?php previous_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Previous page',
'in_same_parent' => true,
) );?> |
<?php next_page_link_plus( array(
'order_by' => 'post_title',
'loop' => true,
'max_length' => 30,
'tooltip' => 'Next page',
'in_same_parent' => true,
) );?>I know I still have some open/close php tags that shouldn’t be there but not sure how to modify to get rid of them.
I still don’t see page links showing up here
http://juicytravels.com/the-ten-best-first-class-airline-experiences-today/
And this is what I have in my child styles file relevant to this:
#my-post-nav {
clear: both;
border-top: 1px solid #E3E3E3;
padding-top: 10px;
text-align:center;
}
.entry-footer {
display: none
}
#previous, #next-post {display: none;}We didn’t use a loop file. And I *think* this is the only code we added to make the post plug in work. I don’t think I changed any template files or anything like that.
Thanks so much in advance for the help.
In reply to: Next/Previous Post Link Plus (Ambrosite) Plug In making post disappear
October 3, 2011 at 7:42 pm #16829I just installed the page version of the Ambrosite plug in. Any chance you know how to get that one working like we did for the post nav plug in? I imagine it’s very similar…but not sure how to do it…any ideas?
By the way for the post nav one, this is the code we put on my child theme functions file
function my_post_nav(){
// this will allow us to use other hooks but still only show on single posts
if ( is_single() && ! is_page() ) : ?>
<div id="my-post-nav"> <!-- div to contain your links -->
<?php previous_post_link_plus( array(
'order_by' => 'menu_order',
'loop' => false,
'max_length' => 0,
'tooltip' => 'Previous page',
'in_same_cat' => true,
'ex_cats' => '12'
) );?> |
<?php next_post_link_plus( array(
'order_by' => 'menu_order',
'loop' => false,
'max_length' => 0,
'tooltip' => 'Next page',
'in_same_cat' => true,
'ex_cats' => '12'
) );?>
</div>
<?php endif;
}I’m thinking something similar for the page version but not sure what to duplicate and tweak?
The point is to be able to navigate specifically among the pages/subpages of one parent page, not every page on the site.
