Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    in the related-ads.php file, you can try changing the 9000 number (on line 12) to some much bigger number like 900000.

    That said it might not help if the sharing buttons come from the theme single post template file. In this case, the only way to move the related ads below the sharing options would be to create in your current theme folder a single-advert.php file (as explained here https://wpadverts.com/doc/child-themes-and-templates/ in the “Custom Post Type Template” section) and somewhere below the sharing buttons paste this code

    
    <?php related_ads_tpl_single_bottom( get_the_ID() ) ?>
    
    Thread Starter chauthong

    (@chauthong)

    Hi,

    Thanks for your guide! Now there’s a “relevant ads” box below the “share” box as I expected. And how do I remove the “Related Ads” above as shown in the screenshot I sent you in the previous message?

    Thank you!

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    to remove the “Related Ads” text you would need to open the related-ads.php file and on line about 26 remove the whole line

    
    echo '<h3>' . __( "Related Ads") . '</h3>';
    

    or comment it out by adding // at the beginning of the line.

    Thread Starter chauthong

    (@chauthong)

    Hi ,

    I mean I want to remove the “related ads” section above the share button that it appeared when I added the related-ads.php pluin to the site (screenshot https://imgur.com/MPFTwWL)

    Thank you!

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    oh i see you have the Related Ads added below sharing bar using the second method I explained.

    In this case, in order to remove the related ads above sharing bar, you just need to remove from the related-ads.php file the line

    
    add_action( "adverts_tpl_single_bottom", "related_ads_tpl_single_bottom", 9000 );
    
    Thread Starter chauthong

    (@chauthong)

    Hi,
    It has been solved, Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Move the position of related ads !!’ is closed to new replies.