• Resolved elotse

    (@elotse)


    I try to implement YARPP functions to pages. For Testing I used the same tags fort the test page and for posts. The match threshold is set to 1.
    1) If I’m using related_posts() there is no related post!
    2) If I’m using related_pages() or related_entries() only pages are displayed
    Some idée ???

Viewing 15 replies - 1 through 15 (of 30 total)
  • Try related_entries and make sure the “cross-relate posts and pages” option is turned on in the YARPP options.

    Thread Starter elotse

    (@elotse)

    The option cross-related posts and pages is turned on!
    For testing there is a test page: http://www.test.kk4you.de/yarpp-testseite
    The cross related test post is: http://www.test.kk4you.de/yarpp-test-post-519.htm
    On the test page all three versions are implemented (posts, pages and entries). I believe there is something wrong with the post function because there is no indication of related posts (zur Zeit sind keine Beiträge verfügbar)

    Ah, thank you for bringing this to my attention. I just made a little change which might fix this… could you try this new version?

    http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.zip

    You can try first my upgrading to this version, then if it still isn’t fixed, if you could try clearing your cache, that’d be great.

    Thread Starter elotse

    (@elotse)

    There is a change, but I believe it’s still not working correct!
    1) The function related_posts implemented on the page test side shows me the same result as the others! (related_pages or related_entries)
    2) For testing I reduced the relevance just to the Tags only to get the input of the test post with the tag YARPP.
    3) There is still no input from the posts!!!!!

    Hmm, I see. So at least with “cross-relate” it’s giving you the same results everywhere now, which is a fix. As for the relatedness, have you tried adding more tags which they have in common? Keep in mind that pages by default don’t have tags, so that may be a limiting factor. Does that test page have the YARPP tag on it?

    Thread Starter elotse

    (@elotse)

    I test now with 4 Tags (apfel, banane, birne, yarpp). These tags are only used by this test page and post!
    For the tagging of pages I’m using the plugin tagpages
    I checked also the code of the page:
    <meta name=”description” content=”Test der YARPP Funktion” />
    <meta name=”keywords” content=”apfel,banane,birne,yarpp” />
    <link rel=”canonical” href=”http://www.test.kk4you.de/yarpp-testseite&#8221; />

    @elotse, what plugin is this? Can you add a link for that tagpages plugin?

    You might want to try adding a lot of the same content to both too to see if just the content body will pick up the relatedness.

    Thread Starter elotse

    (@elotse)

    Hello Mitcho,
    The Link to the used Plugin: tagpagesFor testing I have implemented the same content on the page and post
    The result is no different. The post will not be found!!!

    I believe the tagpages plugin is doing a lot more than it needs to do to get that functionality. I added the same functionality on a couple of my sites with the following code in functions.php of my theme:

    add_action(‘init’, ‘ecs_theme_init’);
    function ecs_theme_init() {
    register_taxonomy_for_object_type(‘post_tag’, ‘page’);
    }

    You may want to try that too.

    Otherwise… try adding some more redundant text! Are you getting results elswhere with posts showing up?

    Thread Starter elotse

    (@elotse)

    The problem still exists!
    To get it solved I have done the following actions.
    • All other plugins are deactivated (there should no influence)
    • YARPP completely new installed with your new version
    • Created a post and page with the same content and the same tags
    post: http://www.test.kk4you.de/yarpp-testseite
    page: http://www.test.kk4you.de/yarpp-test-post-519.htm• Implemented on the single.php and the page.php the same test code with all three functions

    <?php
    echo "<br><br><h5>test of related_posts</h5>";
    related_posts();
    echo "<br><br><h5>test of related_pages </h5>";
    related_pages();
    echo "<br><br><h5>test of related_entries =posts and pages</h5>";
    related_entries();
    ?>

    Results:
    1. If the option „show post and page together“, is switched on, in general all three related function gives me the same information
    The different is between page and post
    The post shows the related page and post
    The page shows related pages only
    2. If the option is switched off
    The page has no input by the function related_posts
    The post has no input by the function related_pages

    As the last test i implemented in the function.php your proposal code but it was no influence.

    Great plugin! Thank you for your work!

    I’ve a similar problem:
    I’ve integrated related_entries() and related_posts() in the page template.

    I made an extralong post which is an exact copy of an extralong page. They have the same categories and tags.
    http://www.virtuallaw.at/recht/
    http://www.virtuallaw.at/allgemein-markenanmeldung-80/

    I’ve choosen „show post and page together“ in the YARPP config panel.

    Result:
    + The post frontend shows the page as a related entry.
    – The post backend “related posts box” doesn’t show the page as a related entry (continues to show only related posts)
    – The page frontend only shows “no results” (which I configured in the YARPP config panel to make sure that the related_entries() code does anything at all).
    – The page backend doesn’t show the related post box at all.

    So it works only in the posts front end.

    I hope this is understandable.

    Thank you for any help!

    Greetings Peter

    (I updated to the newest version on wordpress.org before posting to make sure it’s not an old version prob)

    Using
    add_action(‘init’, ‘ecs_theme_init’);
    function ecs_theme_init() {
    register_taxonomy_for_object_type(‘post_tag’, ‘page’);
    register_taxonomy_for_object_type(‘categories’, ‘page’);
    }

    Okay, I think I finally figured this issue out. Please try out this new beta:

    http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.3.2.2b1.zip

    Thank you for your help!

    I tried it and it got better but it is not fixed:

    Results:
    + The post frontend shows the page as a related entry.
    + The post backend “related posts box” shows the page as a related entry (continues to show only related posts)

    – The page frontend only shows “no results” (which I configured in the YARPP config panel to make sure that the related_entries() code does anything at all).
    – The page backend doesn’t show the related post box at all.

    So YARPP works within posts but not within pages.

    Greetings, Peter

    Update:

    I reconfigured YARPP to shows results with relevance 1 instead of 5.

    Now the pages frontend shows results, but weird ones.

    The page backend still doesnt show the yarpp box (is there anything special to do to make this work? maybe I havent done something important?)

    The page shows only 2 posts with result 1 but not the almost identical post.
    http://www.virtuallaw.at/recht/

    The almost identical post shows the page (relevance 78) and some other less relevant posts and pages.
    http://www.virtuallaw.at/allgemein-markenanmeldung-80/

    I also tried relevance 1000 to make sure that the page doesnt work the other way round and only shows posts <= relevancy but then posts and pages show no results at all (which is most likely correct).

    I kept the yarpp settings at 1 so that you can see the results yourself.

    Greetings Peter

    OK, this solves the pages backend problem:

    function yarpp_add_metabox() {
    	if (function_exists('add_meta_box')) {
        add_meta_box( 'yarpp_relatedposts', __( 'Related Posts' , 'yarpp'), 'yarpp_metabox', 'post', 'normal' );
        add_meta_box( 'yarpp_relatedposts', __( 'Related Posts' , 'yarpp'), 'yarpp_metabox', 'page', 'normal' );
    	}
    }

    Maybe it can be solved better or even as an option in the YARPP options page, but my php skills arent good enough for this 🙁

    Greetings, Peter

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] related_posts on pages’ is closed to new replies.