• Resolved scuderiadank

    (@scuderiadank)


    Is there a way to add this automatically beneath every post, using just the block editor?

    I understand you can do it manually in each post, but it would be great if you could also do it just once via the site editor with a block. By this I mean Appearance > Editor > Single template, then add the CRP block.

    Appreciate this is possible via editing single.php, but the block method would be a lot easier. Unless I’ve missed something?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Brecht

    (@brechtvds)

    Following those exact steps to add the CRP block in the template should work fine. Is that not the case for you?

    Thread Starter scuderiadank

    (@scuderiadank)

    Unfortunately not. It displays ‘block rendered as empty’ within the site editor and I just get ‘none found’ on the front end.

    If I manually add it as a block within a post, then I’m able to display related posts.

    Plugin Author Brecht

    (@brechtvds)

    What theme are you using?

    Thread Starter scuderiadank

    (@scuderiadank)

    Currently using the theme Fork

    Here it is on a new WordPress install with just CRP active: https://htened-fly-vile.instawp.xyz/test-post-1/

    There are two other posts (test-post-2 and test-post-3), which have the same category and tags.

    Plugin Author Brecht

    (@brechtvds)

    It does actually work fine for me on a new WordPress install using only CRP and that Fork theme: https://t-of-death-texi.instawp.xyz/hello-world/

    You mention “which have the same category and tags” but Custom Related Posts will only display related posts that you have manually set: http://help.bootstrapped.ventures/article/158-setting-related-posts

    Thread Starter scuderiadank

    (@scuderiadank)

    But if you add it as a block below the post content on the Single template (so that it appears beneath each post), then how do you manually adjust it?

    The example you’ve given is a block added manually within a post, which is different to what I asked originally? I may be missing something here?!!

    Plugin Author Brecht

    (@brechtvds)

    The example I’ve given includes both the CRP block in the post content and one in the single template. The second one is right above the comments section.

    This is the post it relates to, where you can find that same block above the comments section: https://t-of-death-texi.instawp.xyz/another-post/

    I’m not sure what you mean by “how do you manually adjust it”? You still have to manually set the related posts for the post itself. It’s just that those related posts now get automatically displayed.

    Thread Starter scuderiadank

    (@scuderiadank)

    Appearance > Editor > Templates > Single.

    I add the Custom Related Posts block directly beneath the Post Content block. It displays ‘Block Rendered as Empty’. I’ve read the documentation on your site, but I still can’t work out how to get your plugin to work?

    Plugin Author Brecht

    (@brechtvds)

    Sure, that’s normal. But the block will render correctly on the actual site. Like in the example I gave.

    The rendering empty in that editor preview does not affect anything.

    Thread Starter scuderiadank

    (@scuderiadank)

    I just figured that out as you replied! Apologies for being stupid. I’ve got it to work now. Thanks for the replies.

    Plugin Author Brecht

    (@brechtvds)

    Happy to hear you got things working! Do let me know if you have any further questions at all.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Insert automatically via block editor?’ is closed to new replies.