• Hello,

    I would like to add the same text to every post that I have.
    I added in my function.php however it’s not showing on my AMP pages, onlye desktop.
    The text I added is this: https://ibb.co/zSRm9qs

    Is there any options to add this the same way I added via function.php on desktop version?

    Best Regards.

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    Can you please share the code from which you are adding it from functions.php? Share that code through https://pastebin.com/

    After seeing that code we have to suggest how to fix it.

    Thread Starter gamehubpt

    (@gamehubpt)

    Hello,

    Here it is: https://pastebin.com/hbA89sUa

    Thank you for answer

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    We checked your issue.

    1. Can you please update the priority of 99 in the filter like this:
    From this -> add_filter(‘the_content’,’add_my_content’);
    to this -> add_filter(‘the_content’,’add_my_content’, 99);
    And please check once whether it is working or not.

    2. If for some reason if it is not working after adding the priority then add this amp specfic filter code.

    add_filter(‘ampforwp_modify_the_content’,’add_my_content’);

    • This reply was modified 6 years, 1 month ago by Ahmed Kaludi.
    Thread Starter gamehubpt

    (@gamehubpt)

    Greetings,

    Thank you for your answer.

    Unfortunately none of the two solutions worked.

    I even replaced
    add_filter(‘the_content’,’add_my_content’, 99);
    for
    add_filter(‘ampforwp_modify_the_content’,’add_my_content’, 99);

    And nothing.

    Best Regards

    Thread Starter gamehubpt

    (@gamehubpt)

    When I test any AMP post page no my desktop, it shows, however if I resize it to a mobile screen and reload the page, it disappears.

    Plugin Author Ahmed Kaludi

    (@ahmedkaludi)

    This is a strange issue. Can you please tell me are you still facing the same issue?

    • This reply was modified 6 years, 1 month ago by Ahmed Kaludi.
Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Add text to every Post’ is closed to new replies.