Community Forums › Forums › Archived Forums › Design Tips and Tricks › Related Posts not showing on page_blog.php
- This topic has 15 replies, 2 voices, and was last updated 10 years, 7 months ago by
ken.
-
AuthorPosts
-
September 2, 2014 at 1:43 pm #122471
ken
MemberRelated Posts are showing up on http://www.mt2.sohtest.com/late-spring-garden-chores-2/ which uses single.php. They are not showing up on http://www.mt2.sohtest.com/blog/ which uses page_blog.php. Any ideas on why this is happening?
http://www.mt2.sohtest.com/blog/September 2, 2014 at 2:29 pm #122480Brad Dalton
ParticipantSeptember 2, 2014 at 2:43 pm #122483ken
MemberThanks for the reply. A plugin: http://www.relatedpostsforwp.com
September 2, 2014 at 3:27 pm #122492Brad Dalton
ParticipantYou need to hook in the related posts using the shortcode or template tag in a custom function using the blog page conditional tag unless the plugin settings enable you to display on the blog page template.
I would ask the plugin author for the template tag or use the shortcode in a custom function
[rp4wp]
September 3, 2014 at 7:36 am #122562ken
MemberThanks for the solution. Will work on this today. Thanks again.
September 3, 2014 at 9:00 am #122584ken
MemberIs it the evil 'Blog' template that is messing this up??? You can see on http://www.mt2.sohtest.com/late-spring-garden-chores-2/ the You May Also Like is on there twice. But on http://www.mt2.sohtest.com/blog/ which uses Blog template there is no You May...
September 3, 2014 at 9:12 am #122586Brad Dalton
ParticipantSeptember 3, 2014 at 9:44 am #122590ken
MemberCreated the custom blog template and the same result. Ughh. I am using the enterprise-pro child theme and I just do not understand while this will not work. Am I approaching this the wrong way? What I want is a Blog page that shows the most recent post with the same formatting as if you were looking at any of the other posts by themselves.
September 3, 2014 at 10:14 am #122595ken
MemberLooks like I might be closer. I can echo text in the selected area, but I cannot execute the short code
\\<?php
echo "Hello world!";
?>
<?php echo do_shortcode( '[manual_related_posts]' ); ?>Will investigate further.
September 3, 2014 at 10:17 am #122598Brad Dalton
ParticipantAre you referring to the blog page template conditional not working?
September 3, 2014 at 10:25 am #122599ken
MemberI do not have any 'conditional' set up yet. If I look at a single post using single.php, the hook is executed and it all works fine. It is when the page_blog.php is called it does not show up.
September 3, 2014 at 10:30 am #122600ken
MemberI am using Genesis Extender to code the hooks.
September 3, 2014 at 11:56 am #122621Brad Dalton
ParticipantYou wouldn't display related posts on the blog page as its a archive page listing posts, you would display them after single posts.
It won't work on the blog page unless the plugin includes a widget.
The reason it won't work is because which posts are related when there's a list of posts.
September 3, 2014 at 12:15 pm #122624ken
MemberAs you can see on this page http://www.mt2.sohtest.com/blog/ the blog page is set to only show one post (the most recent). Am I trying to do the impossible?
Should I be doing this by adding custom fields to the Post entry screen?
September 3, 2014 at 2:07 pm #122648Brad Dalton
ParticipantSeptember 3, 2014 at 2:24 pm #122653ken
MemberThank you very much for your help on this. Time to stick a fork in this one.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.