• Resolved spost

    (@spost)


    Hello,
    I tried submitting this already a few days ago but it didn’t show up in the posts. I’m not sure if I did it incorrectly or if it needs approval. In case I didn’t do it properly, I’m trying again. Apologies if it’s a duplicate.

    This plugin is great! I like that it searches post context and is very good at recommending articles. I also like the method of automatically inserting the module at a certain paragraph number.

    My site is run in conjunction with memberpress & Elegant Theme’s Extra theme. When logged in, my posts have CRP inserted at the proper location. When not logged in, the module doesn’t insert. Could you help me understand why it may not be working? Is the software looking for something specific in order to properly insert into the page? I suspect CRP is not finding what it’s looking for and is therefore not inserting.

    I don’t know enough about the coding language of plugins to be able to figure it out but with guidance, I’m sure I can help debug and arrive at a solution!

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ajay

    (@ajay)

    The plugin doesn’t check for logged in users. Are you able to check with the WordPress default themes – twenty nineteen or twenty twenty?

    Thread Starter spost

    (@spost)

    Hi @ajay ! I figured as much that the plugin isn’t looking if the user is logged in. When I asked if the plugin is looking for something specific in the post, it was because I noticed that memberpress modifies things slightly (classes, etc) when not logged in. I thought that maybe the modification causes CRP to not find a class / ID that it needs in order to insert at a proper location.

    In any case, I checked and loaded everything on my staging site using the 2020 theme. I am still seeing the original issue. I do believe it has something to do with memberpress but I am not sure how to read the code to figure out what it needs in order to insert the inline related posts.

    Plugin Author Ajay

    (@ajay)

    The plugin automatically inserts the related posts by filtering the_content filter. Is this for some reason bypassed by memberpress on the front end?

    You can also do the manual option of using get_crp() (details in FAQ) by editing your theme file.

    On a manual basis, you have the shortcode and/or the gutenberg block as well. Latter was added in the latest version

    Thread Starter spost

    (@spost)

    Hi Ajay,
    Thank you for helping me. Your hint on the “the_content” filter enabled me to have a productive conversation with Memberpress Support. They confirmed that under certain rule conditions, “the_content” is not being used – essentially when the rule limits the post display.

    I found a work around. It involves hiding content based on shortcodes instead of the “more” tag. Apparently, with the more-tag option of hiding portions of the posts, the_content is not being used any longer. But when I use shortcodes, the_content is used and therefore your inline related posts work great!

    • This reply was modified 4 years, 10 months ago by spost. Reason: mark as resolved
    Plugin Author Ajay

    (@ajay)

    Thank you for your patience and for digging into this to finding a solution.

    Do consider a review of the plugin

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Related Posts not displaying when logged out’ is closed to new replies.