Problem with Child Theme and single php after updating to new version
After updating to the new version 1.6 on my test domain http://www.naechilla.de and activation of my child theme there is an error displaying the posts.
The WordPress version is 3.3.1 on both sites and I use a child theme to show related posts with this plugin: http://wordpress.org/extend/plugins/related-posts-by-category/
The child theme contains a style.css and, as you advised, a loop-single.php in the upgraded test system, instead the single.php in the original (not upgraded) system.
The content of the phpÂ´s:
‘inside’ => ‘…..» ‘,
‘outside’ => ”,
‘after’ => ‘
‘orderby’ => ‘rand’,
‘order’ => ‘ASC’,
‘limit’ => 4,
‘echo’ => true,
‘before’ => ‘
‘rel’ => ‘follow, noindex’,
‘type’ => ‘post’,
‘image’ => ‘thumbnail’,
‘message’ => ‘Keine Treffer’,
When I click an article, I will get only the results, no article text, no comments, no comments box ..
My original site http://www.tiergeschichten.de still uses Graphene 1.5.6 and there is no problem.
Can you help me?
AnonymousFebruary 12, 2012 at 4:54 am #23708
You don’t need to create a loop file in child theme. Instead, use action hook widgets and PHP widget plugin to show the related posts list
These tutorials might help you –
Graphene Action Hook Widgets – an easy way to modify your blog – http://blog.kjodle.net/2011/11/04/graphene-action-hook-widgets-an-easy-way-to-modify-your-blog
Video Tutorial: Using Action Hooks in Graphene (Simple) – http://www.joshlobe.com/2011/10/video-tutorial-using-action-hooks-in-graphene-simple/
Video Tutorial: Using Action Hooks in Graphene (Advanced) – http://www.joshlobe.com/2011/10/video-tutorial-using-action-hooks-in-graphene-advanced/
thanks for your help. I found out how to modify the theme with the hooks without using a child theme. Great! That will give me some ideas 😉
There is still one little problem: The related posts are shown on the start page (index.php) as well.
AnonymousFebruary 13, 2012 at 10:18 am #23710
If you’re familiar with PHP and WordPress functionality, try using
is_single()Conditional Tag to show the widget only in the posts page.
if (is_single ())
Your Related Posts plugin code"
Else, use Widget Logic plugin to control the appearance of your widgets (Here, Related Posts is a widget)
In your case, use
is_single()to restrict Related Posts widget only to the posts.
AnonymousFebruary 13, 2012 at 1:11 pm #23712
- You must be logged in to reply to this topic.