• This is a development domain for a humane society in Florida. Petfinder fixed my API key to show full descriptions because we are a shelter, using Petfinder listings on our website.

    I want to add something (a text link) to the bottom of every listing. I added the function snippet from the documentation to my functions.php file and nothing happens:

    function replace_pet_description( $description ) {
    return $description . ” Add me to end of all pets’ descriptions”;
    }
    add_filter( ‘petf_replace_description’, ‘replace_pet_description’ );

    I cleared my browser cache. Tried it in functions.php in my theme file and also in my child theme; neither worked.

    Can you steer me toward a fix?

    Many thanks.

    • This topic was modified 3 years, 5 months ago by suzyloonam. Reason: clarity

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

Viewing 1 replies (of 1 total)
  • Plugin Author bridgetwes

    (@bridgetwes)

    Hi @suzyloonam – That filter and function should work as you have it. Since you are working on a development site, can you try adding the following right above the function replace_pet_description in your functions.php file to ensure this part of the code is being run?

    echo ‘**** I GET HERE ****’;

    Then refresh a page on your site and see if that text, ‘**** I GET HERE ****’, prints to the page someplace? If you don’t see it, ensure you are editing the right functions.php for the active theme, and you are in a part of functions.php that is not inside of open/close php comment tags.

    If you are still having issues, you can contact me through my website so we can exchange emails and you can send me files: https://unboxinteractive.com/contact/

Viewing 1 replies (of 1 total)
  • The topic ‘Filters “Add me to pets’ listing”’ is closed to new replies.