• Resolved amdark

    (@amdark)


    Is there a way for related posts to be displayed before the h2 tag?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author YARPP

    (@jeffparker)

    Hi @amdark Using the YARPP Shortcode, YARPP Block or YARPP function, you can place YARPP anywhere on the page/template.

    More:
    https://www.ads-software.com/plugins/yet-another-related-posts-plugin/#installation

    In addition, you can customize the priority order for YARPP automatic placements using filters:

    https://support.shareaholic.com/hc/en-us/articles/4408775687060-Developers-Filters

    For example:

    
    add_filter( 'yarpp_content_priority', 1 );
    
    Thread Starter amdark

    (@amdark)

    I was reading this documentation, I found it a bit complicated because I don’t have much experience with programming.

    I would like that in all my posts (without exception) before the H2 tag the YARPP displays the related topics.

    Would I have to add the shortcode code [yarpp] or PHP function yarpp_related() in single.php? If so, I didn’t understand how to set it to be displayed before the H2.

    thanks for listening

    Plugin Contributor Shareaholic

    (@shareaholic)

    Would I have to add the shortcode code [yarpp] or PHP function yarpp_related() in single.php? If so, I didn’t understand how to set it to be displayed before the H2.

    It’s hard for me to say specifically for your case as each theme has a different code structure.

    1. If you’re using a Block-enabled theme, you can drag and drop the YARPP Block exactly to where you want it using the WordPress editor.

    2. If you want to use the shortcode, whichever file contains your H2 tag, in that place <?php echo do_shortcode('[yarpp]'); ?> or [yarpp] in the location you want YARPP to appear.

    Thread Starter amdark

    (@amdark)

    Hello, I was able to add using editor blocks. It turned out really good.

    Would it be possible for me to reduce the number of related posts from 6 to 4 when inserted through the block? In automatic mode I got it but not for the block.

    Plugin Author YARPP

    (@jeffparker)

    @amdark that’s great!

    Yes, you can specify the max number of related posts to any number you’d like in the Block’s settings.

    Thread Starter amdark

    (@amdark)

    Unfortunately, mine doesn’t show these options. Could be the time I’m using Generated press.

    https://uploaddeimagens.com.br/images/003/750/772/original/Captura_de_Tela_2022-03-02_a%CC%80s_13.01.41.png?1646240547

    • This reply was modified 3 years ago by amdark.
    • This reply was modified 3 years ago by amdark.
    Plugin Author YARPP

    (@jeffparker)

    If you mouse over the YARPP block, a menu should appear like this for Block options –

    Thread Starter amdark

    (@amdark)

    wow, so easy and I didn’t notice it. How inattentive of mine. Thanks for all the help.

    Plugin Author YARPP

    (@jeffparker)

    You’re welcome!

    Please consider leaving a review, we would really appreciate it:
    https://www.ads-software.com/support/plugin/yet-another-related-posts-plugin/reviews/

    Hello @jeffparker

    Fantastic plugin!

    I am having the same problem as OP. I have your plugin set to display 1 related post at the bottom of my article via elementor single post template (great). However, like OP I would like other related posts to display inside my article (having it after every h2 tag or another rule is ideal). You recommended using the block, but that poses an issue that makes it unworkable in this scenario.

    That issue is that there is no “offset” in the block. This means you can only use the block once in an article which leads to duplicate related posts. Do you have a remedy for this situation or do you offer a paid service for something more custom like what OP suggested?

    Thank you and I wish you well.

    • This reply was modified 2 years, 11 months ago by monia09.
    • This reply was modified 2 years, 11 months ago by monia09. Reason: clarification
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Related posts before the H2 tag’ is closed to new replies.