Welcome!
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › StudioPress Themes › Magazine Pro › Reposition Single Post (Page Break) Pagination Directly Under Content
Tagged: Entry Pagination, genesis_do_post_content_nav, genesis_prev_next_posts_nav, paginated posts, single post
- This topic has 8 replies, 2 voices, and was last updated 1 year, 7 months ago by BrandonPDuncan.
-
AuthorPosts
-
April 7, 2023 at 6:13 pm #507188BrandonPDuncanParticipant
Team,
I've seen this fix multiple times in various venues, to include on Brad Dalton's site, but for some reason I cannot get it to work anymore.
Bottom line, the page break pagination navigation shows up and works fine, but it is positioned underneath Jetpack widgets (Sharedaddy and Related Posts...)
Rather than scour the net for fixes to move all the Jetpack stuff lower, I was hoping to force the entry-pagination higher. It makes no sense where it is located.
I am using the latest Genesis and Magazine theme.
Thanks.
April 8, 2023 at 1:50 am #507189Brad DaltonParticipantApril 8, 2023 at 6:20 am #507194BrandonPDuncanParticipantHello, Brad. I did not add any code to get the entry-pagination to work, so I really do not know what code to add in Genesis Simple Hooks. I tried a block of code from a tutorial you pointed to here on the forum and nothing happened.
As for repositioning Jetpack, I haven't tried, but I will let you know.
April 8, 2023 at 8:19 am #507195Brad DaltonParticipantApril 8, 2023 at 3:10 pm #507199BrandonPDuncanParticipantSorry, I'm stationed in S. Korea. Big time zone difference.
I started with the instructions in this post here: https://studiopress.community/topic/pagination-exclusion-and-positioning/
That post links to your tutorials:
1. https://wpsites.net/genesis-tutorials/reposition-or-modify-genesis-single-post-navigation/I attempted to copy/paste the reposition code block into my child theme Functions.php - no result. I installed Genesis Simple Hooks, but I have no clue what piece to place in the after content hook.
I want to say I did this on a site years ago, but a lot has changed in the Genesis code since then... and i'm rusty...
April 8, 2023 at 3:24 pm #507200BrandonPDuncanParticipantAs for moving Jetpack, the code provided for this adds a second row of share buttons only. I can put them wherever, hook-wise, but it doesn't move or remove the original placement, therefore the entry_pagination is still stuck under everything.
April 8, 2023 at 11:29 pm #507201Brad DaltonParticipantYou may need to change the hooks for the Jetpack code.
As for the single post navigation, the code to reposition this will depend on how its added in the first place.
Also note : Genesis Simple Hooks may override custom PHP code so deactivate the plugin of using PHP code in your functions file.
ALL code on wpsites.net is tested and works.
April 8, 2023 at 11:45 pm #507202BrandonPDuncanParticipantSir, good call. I disabled the GSH Plugin and changed the hook for the sharing buttons to "genesis_before_entry" and it worked (no duplication).
Ok, I will try to find the functions to do same thing for the Jetpack "Like" and "Related Posts".
I am curious, since I did not have to add any code to do the entry_pagination (I have not added single post navigation yet---I am only working with native wordpress breaking posts into multiple pages), how would I go about hooking them to a different location?
Can I theoretically use the "single post nav" code and just change the function to "entry_navigation"? I wouldn't think the page breaks are a Genesis thing, but wordpress...
Thanks for the help. I appreciate it.
April 9, 2023 at 1:50 am #507205BrandonPDuncanParticipantWell, it certainly isn't pretty, but it works.
Snippet:
// Coding to Re-order Jetpack Sharing Buttons, Likes, and Related Posts.
add_action( 'genesis_before_entry_content', 'reposition_jetpack_sharing_buttons' );
add_action( 'genesis_entry_footer', 'reposition_jetpack_sharing_buttons' );
add_action( 'genesis_entry_footer', 'reposition_jetpack_likes' );
add_action( 'genesis_entry_footer', 'reposition_Jetpack_RelatedPosts' );function reposition_jetpack_sharing_buttons(){
remove_filter( 'the_excerpt', 'sharing_display', 19 );
remove_filter( 'the_content', 'sharing_display', 19 );
if ( class_exists( 'Jetpack_Likes' ) ) {remove_filter( 'the_content', array( Jetpack_Likes::init(),'post_likes' ),30, 1 );
}
if ( class_exists( 'Jetpack_RelatedPosts' ) ) {
$jprp = Jetpack_RelatedPosts::init();
$callback = array( $jprp, 'filter_add_target_to_dom' );
remove_filter( 'the_content', $callback, 40 );
}if ( function_exists( 'sharing_display' ) ) {
echo sharing_display();
}
}function reposition_jetpack_likes() {
if ( class_exists( 'Jetpack_Likes' ) ) {$custom_likes = new Jetpack_Likes;
echo $custom_likes->post_likes( '' );
}
}function reposition_Jetpack_RelatedPosts() {
if ( class_exists( 'Jetpack_RelatedPosts' ) ) {
echo do_shortcode( '[jetpack-related-posts]' );
}
}Site:
-
AuthorPosts
- You must be logged in to reply to this topic.