• WPguy

    (@romangurbanov)


    Hi Greg,

    For some reason, WPAdverts prevents “AddToAny Share” plugin to show share icons on the ads page.

    The share icons work perfectly on posts and pages though.

    Any thoughts on how to fix that?

    Thanks
    Roman

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

    (@gwin)

    Hi,
    you can try changing the adverts_the_content function priority and see if it helps, it is possible that WPAdverts is overwriting the AddToAny content since it is running last.

    To change the priority add the below code to the functions.php file

    
    add_action( "init", "set_priority_for_wpadverts_the_content", 20 );
    function set_priority_for_wpadverts_the_content() {
        remove_filter('the_content', 'adverts_the_content', 9999);
        add_filter('the_content', 'adverts_the_content', 10 );
    }
    
    Thread Starter WPguy

    (@romangurbanov)

    Thanks, Greg.

    Which line of the functions.php file works best to place this code?

    Plugin Author Greg Winiarski

    (@gwin)

    It does not make much difference really, usually, users put it at the end of the file (but before the ?> if it is there at the end of the file).

    You can also consider creating a new blank plugin and pasting the code there, then it will not be overwritten on WPAdverts or theme update https://wpadverts.com/blog/how-to-use-code-snippets-in-wordpress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prevents share icons on ads to show up’ is closed to new replies.