• i was wondering if there is any way to relate based on Keyword.. or other parameters.. i have several pages with the same title but with a different city in the title.. i would like to display related posts based on the city in the title.. The title is SEO optimized and cannot change.. Is this possible or are there things in the works to make this a possibility.. possibly through custom fields?

    https://ww.wp.xz.cn/plugins/contextual-related-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter tim_gig

    (@tim_gig)

    Another way would be to exclude certain words from the relational data. Could i exclude all commonly used words from the title to focus on certain words to relate? Really i just want to be able to make a custom filter.

    Plugin Author Ajay

    (@ajay)

    Tim, in the current version you can’t filter out any of the text. In theory you could make these modifications to the contextual-related-posts.php file to add a filter for this:

    Refer to this file:
    https://plugins.trac.ww.wp.xz.cn/browser/contextual-related-posts/trunk/contextual-related-posts.php

    After line 390 add:

    $stuff = apply_filters( 'crp_match_content', $stuff );

    This will add a new WordPress filter to the $stuff variable which contains what is matched later on.

    You could then create a function to filter this:

    function filter_crp_match_content( $stuff ) {
    
        $stuff = str_replace( "HERE IS WHAT YOU WANT TO REPLACE", "", $stuff );
        return $stuff;
    }
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Keyword relation’ is closed to new replies.