• Resolved leost

    (@leost)


    Hello,

    I have a custom 404 page that has a list of itens (“Materiais em destaque”) that when clicked opens up a modal and inside the modal I have four sharing buttons. I have the data-a2a-url and data-a2a-title parameter set correctly according to the current modal content. When I click the sharing button it is sharing the “404 not found” page instead.

    I use it the same way on another pages and it works great, but on 404 pages it doesn’t work.

    Here is a forced 404 page: https://evc.camara.leg.br/k
    Here is the home page: https://evc.camara.leg.br

    You can see the “Materiais em destaque” part near the footer. They are set the same way.

    Any suggestions?

    Thank you!

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

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

    (@micropat)

    Hello, awesome customizations and use case! It looks like your AddToAny sharing instance is stuck in a state of presuming the current page should be shared.

    Try giving your [addtoany] shortcode some initial values by adding url and title attributes. That should do the trick.

    addtoany url="https://www.example.com/" title="Example"

    Thread Starter leost

    (@leost)

    Hello! Thank you for the compliments! This is a great plugin also! Easy to use and to customize. And a good documentation also.

    My addtoany shortcode has the attributes url and title set, but with empty values. I will try to give it some value and see what happens and let you know.

    Thread Starter leost

    (@leost)

    Hi again, micropat!

    I did as you say and now it works!

    My code was do_shortcode(‘[addtoany url=”” title=””]’) and I changed to do_shortcode(‘[addtoany url=”a” title=”b”]’).

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use on 404 pages’ is closed to new replies.