WordPress.org

Support

Support » Requests and Feedback » [Plugin: Yet Another Related Posts Plugin] Options Theme and YARPP

[Plugin: Yet Another Related Posts Plugin] Options Theme and YARPP

  • Hello,

    I found today a possible issue with integration between YARPP and Options theme (http://themehybrid.com/themes/options).

    In options theme on library/functions/template-functions.php around line there is a method that automatically adds in single.php a container for related posts and automatically calls one of the following three functions if exists:

    ('related_posts')
    ('similar_posts')
    ('wp_related_posts')

    So no matter if you check or uncheck the “Automatically display related posts?” the options theme will anyway call the related_posts() function.

    This way there are cases when Related Posts appears twice in the post.

    I can fix this in both ways: modifying your plugin or modifying his theme, but every custom change I make it just adds another thing to do when I update any of them.

    So I see two options for this:
    1. Either you modify the names of the related_posts() and the other similar methods to be something like:
    yarpp_related_posts()
    2. Either Justin modify its theme to support your enable/disable function from your plugin.

    Personally I would prefer the first option, which will make those methods unique and be used with any other plugin/theme.

    Thank you,
    Lucian

Viewing 1 replies (of 1 total)
  • @gls2ro – First of all I don’t understand the problem. If you turn off the “automatically display” related posts option, then it will be called by the instance of related_posts() in the theme and thus will be shown only once.

    In case that doesn’t work…

    Personally I am extrememly hesitant to change the name of YARPP’s related_*() functions as there have been over 20000 downloads of YARPP and many people have changed their themes to use the related_*() functions that they need.

    The simplest way for you to modify my theme when upgrading, fyi, would be to comment out the require_once('related_functions.php') line. That way, you only need to delete/comment one line whenever you get the latest version of YARPP. Hopefully that won’t be too much of a hassle for you.

    Have you gotten in touch with the developer of the Options theme about this?

    mitcho

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] Options Theme and YARPP’ is closed to new replies.
Skip to toolbar