WordPress.org

Ready to get started?Download WordPress

Forums

Contextual Related Posts
[resolved] Related Posts Showing withint Article Body (11 posts)

  1. aliqamarvpn
    Member
    Posted 5 months ago #

    Hi,

    I Installed the plugin and it really is great, prior to it I was using YARP but now switched to CRP because of my custom posts support and date of the posts need (I think these two are the main features that make Contextual stand out from may others).

    But I've an issue being, the related posts get to show right below where the content of my post ends - within the post body (when I view page source, all of the "<div id="crp_related" class="crp_related">" code is within the article body). But I want the related posts show below the post, after/below the sharing buttons I've below my posts. Is there any suggestion to achieve it please?

    I look forward towards your kind suggestions soon!

    Thanks in advance and God bless,
    Ali

    http://wordpress.org/plugins/contextual-related-posts/

  2. Ajay
    Member
    Plugin Author

    Posted 5 months ago #

    Ali,

    You have two options on this one:

    1. Use the Manual Install by editting your theme files. Information of this is in the FAQ

    2. Try something like this under functions.php. Backup your files before doing this

    remove_filter('the_content', 'ald_crp_content');
    add_filter('the_content', 'ald_crp_content',99);

    The number 99 controls at what priority the plugin should ideally kick in. The default is 10 for most plugins. So if your sharing buttons have a priority of 10, then something higher than that will display after the sharing plugins.

  3. djforce
    Member
    Posted 5 months ago #

    Hey, me too, really need to do it.

  4. Ajay
    Member
    Plugin Author

    Posted 5 months ago #

    djforce have you tried the options above?

  5. aliqamarvpn
    Member
    Posted 5 months ago #

    Hi Ajay, I tried the above provided fixes but even though it enabled me to place CRPs in my desired place, yet it also shows them within its default place (again within the article body). So it's making the posts to show twice... Any idea please?

  6. djforce
    Member
    Posted 5 months ago #

    hi, I tried to fix the functions.php file but it did not help ...

  7. Ajay
    Member
    Plugin Author

    Posted 5 months ago #

    aliqamarvpn, Can you try this test: Remove the second line I asked you to add in? i.e only keep remove_filter('the_content', 'ald_crp_content');
    What's the result of this?

    djforce, am assuming you are editting the themes function.php file. Also, are you having the same issue as Ali?

  8. djforce
    Member
    Posted 5 months ago #

    if I put it remove_filter ('the_content', 'ald_crp_content');
    Block disappears from all pages

  9. Ajay
    Member
    Plugin Author

    Posted 5 months ago #

    Can you try adding this to your functions.php file

    // Content function with user defined filter
    remove_filter('the_content', 'ald_crp_content');
    
    add_action( 'template_redirect', 'crp_content_prepare_filter' );
    function crp_content_prepare_filter() {
      add_filter( 'the_content', 'ald_crp_content', 99 );
    }
  10. djforce
    Member
    Posted 5 months ago #

    It also does not help ...
    Output of the block does not fall below the other blocks ...
    You can see this here: http://vekkv.ru/raspisanie-meropriyatiy/
    or here
    http://vekkv.ru/meeting/otkryit-novyiy-nabor-v-gruppu-psihologicheskoy-podderzhki-otkryitoe-prostranstvo/

  11. Ajay
    Member
    Plugin Author

    Posted 5 months ago #

    I checked out the second link. The related posts are at the bottom of your post. What other blocks are you thinking about on that page that the output should come after?

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.