Problem with Child Theme and single php after updating to new version

  • okyankee

    #3166

    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:

      <?php do_action(

      ‘related_posts_by_category’,

      array(

      ‘orderby’ => ‘rand’,

      ‘order’ => ‘ASC’,

      ‘limit’ => 4,

      ‘echo’ => true,

      ‘before’ => ‘

    • ‘,

      ‘inside’ => ‘…..» ‘,

      ‘outside’ => ”,

      ‘after’ => ‘

    • ‘,

      ‘rel’ => ‘follow, noindex’,

      ‘type’ => ‘post’,

      ‘image’ => ‘thumbnail’,

      ‘message’ => ‘Keine Treffer’,

      ‘default’ => ‘http://www.tiergeschichten.de/wp-content/uploads//2012/01/relpostkeinbild.png’,

      )

      ) ?>

    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?

    Dietmar

    Dietmar

    #23707

    Hmm, no answer, no idea, no help?

    Anonymous

    #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/

    Dietmar

    #23709

    Hi Prasanna,

    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.

    Dietmar

    Anonymous

    #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.

    <?php
    if (is_single ())
    {echo "
    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.

    Dietmar

    #23711

    That´s it!

    Many thanks for your excellent support 🙂

    Anonymous

    #23712

    You’re welcome!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Do NOT follow this link or you will be banned from the site!