Community Forums › Forums › Archived Forums › General Discussion › Splitting post content: "Next Page" link
Tagged: next page link, Split Content
- This topic has 5 replies, 2 voices, and was last updated 8 years, 1 month ago by
Victor Font.
-
AuthorPosts
-
January 5, 2017 at 8:28 pm #198836
glauco
MemberHello!
I write about tourism in my blog. My theme is News Pro.
Many of my posts are long and has a lot of photos. Readers usually don't like this. And... Google doesn't like this.
I'd like to split those posts. Then, they would show "Page 2", "Page 3" links at the bottom of the content.
I know how to split posts in WordPress. The problem is: This feature does not work well with my theme.
So what's the problem?
At the end of the post, some extra content appears, like an AdSense ad, and a Related Posts box. The "NEXT PAGE" appears BELOW all of this extra content. This is very confusing. A regular reader will think that the post has abruptly ended with no conclusion. Only a small amount of them will see the discreet Next Page link after the extra content.
How could I force the Next Page link to appear right after the end of the content, and just before the extra content added by widgets? Is that possible? I hope so... So much...
Thank you very much.
http://gdamas.comJanuary 6, 2017 at 9:22 am #198860Victor Font
ModeratorYou can move it to a different hook. You need to decide where you want it to go. Take a look at this code from the genesis/lib/structure/post.php:
// HTML5 Hooks. add_action( 'genesis_entry_header', 'genesis_do_post_format_image', 4 ); add_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 ); add_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 ); add_action( 'genesis_entry_header', 'genesis_do_post_title' ); add_action( 'genesis_entry_header', 'genesis_post_info', 12 ); add_action( 'genesis_entry_content', 'genesis_do_post_image', 8 ); add_action( 'genesis_entry_content', 'genesis_do_post_content' ); add_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 ); add_action( 'genesis_entry_content', 'genesis_do_post_permalink', 14 ); add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_open', 5 ); add_action( 'genesis_entry_footer', 'genesis_entry_footer_markup_close', 15 ); add_action( 'genesis_entry_footer', 'genesis_post_meta' ); add_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); add_action( 'genesis_after_entry', 'genesis_adjacent_entry_nav' ); add_action( 'genesis_after_entry', 'genesis_get_comments_template' );
These are the default rendering actions for any post in Genesis. The action for breaking posts into page navigation is handled by genesis_do_post_content_nav. As you can see above, this is displayed directly after the content. There is nothing rendered in between the content and post content navigation. I suspect you may have adjacent entry nav turned on instead of post navigation. Make sure you use the default WordPress nextpage quicklink in your posts.
It's always possible that some customization to your theme, moved the post nav from it's normal position. News Pro does not do that out of the box.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?January 6, 2017 at 9:17 pm #198909glauco
MemberThank you very much for your attention.
I can't find "post.php". When I go to Edit and select News Pro Theme, the closest to that I can see is "single.php". There, all I see is this:
<?php /** * Genesis Framework. * * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances. * Please do all modifications in the form of a child theme. * * @package Genesis\Templates * @author StudioPress * @license GPL-2.0+ * @link http://my.studiopress.com/themes/genesis/ */ // This file handles single entries, but only exists for the sake of child theme forward compatibility. genesis();
Maybe I should check this via FTP, trying to find that php file.
I'm afraid Google will punish my blog. As I said before, there are loooong posts with lots of photos. I should split them. But it's unacceptable to see the "NEXT PAGE" link BELOW related posts, share buttoms, archived in, tagged with, etc. All my readers would be lost.
Thank you.
January 6, 2017 at 9:22 pm #198910glauco
MemberOK, I found it via FTP.
I'll try! 🙂
January 6, 2017 at 9:45 pm #198912glauco
MemberSorry, not useful to me. The sequence here is the same as yours.
When the content ends, we see then the Related Posts (added by a plugin) => a Google AdSense ad (added via widget in the "After Entry" section) => the post info (category and tags of the post) => and only then... the NEXT PAGE LINK. This is terrible. This link should come EXACTLY after the end of the content, BEFORE all the rest.
Thank you.
January 7, 2017 at 9:11 am #198948Victor Font
ModeratorYou can try moving things around. Add this to functions.php:
remove_action( 'genesis_entry_content', 'genesis_do_post_content_nav', 12 ); add_action( 'genesis_entry_content', 'genesis_do_post_content_nav' ); remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 ); add_action( 'genesis_after_entry', 'genesis_do_author_box_single', 12 );
I tested this in my local environment and it works fine, but I have to warn you that if you have any plugins that write content to the content area, such as social sharing plugins do, you still may not achieve what your want.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.