• Resolved jewelsmac6

    (@jewelsmac6)


    I have downloaded and am now using your Petfinder plugin for a site I am in the process of building. Great plugin, thank you!

    First question is…
    I need to remove the pet’s story from the running list after inserting the short code [shelter_list]. How can I do that, without using the Featured Pet widget so that more than just one pet displays?

    In other words, I would like to display my [shelter_list] without the pet’s description, so that it shows a more compact summary for easy browsing on my home page – only showing the pet’s name, the main pic, and the “include_info”.

    Second question is…
    Because I am finding that the pet’s description is taking too much vertical space, is it possible for the user to click on the pet’s name and the pet’s pic, to then bring the user to the pet’s profile page on petfinder.com? Right now, when I hover or click on the pet’s name, an underline shows up (indicating that the pet’s name is a hyperlink), but after clicking the pet’s name, it doesn’t go anywhere; its a dead link. Having the pet’s name and photo link to their profile page on petfinder.com would be perfect!

    Thanks again for the great plugin!!

    https://www.ads-software.com/extend/plugins/petfinder-listings/

Viewing 11 replies - 16 through 26 (of 26 total)
  • The code that you copy and pasted did not have the missing quote added (line 449 in my Pastebin).

    Please add it in so it looks like $output_buffer .= "<div class=\"dog\"><div class=\"name\"><a href=\"https://www.petfinder.com/petdetail/".$dog->id."\" name=\"" . $dog->id . "\">". $dog->name . "</a></div>"; or Try my version.

    https://pastebin.com/nyXXiX61

    Thread Starter jewelsmac6

    (@jewelsmac6)

    Sorry about that, thank you for correcting me.

    @rawrzors – Here is the link to the complete code for petfinder-listings.php:
    https://pastebin.com/uKhkxZRe

    Thread Starter jewelsmac6

    (@jewelsmac6)

    There seems to be a lag in sending/receiving these posts. I am going to try your pastebin code now.

    Thread Starter jewelsmac6

    (@jewelsmac6)

    That worked!

    But big problem: it broke my wordpress site. I can’t update the page now without seeing the following warnings:

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/49/10092749/html/wp-content/plugins/petfinder-listings/petfinder-listings.php:3) in /home/content/49/10092749/html/wp-login.php on line 384

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/49/10092749/html/wp-content/plugins/petfinder-listings/petfinder-listings.php:3) in /home/content/49/10092749/html/wp-login.php on line 396

    And my API key and ID show as code above the body copy.

    It would be easier for you to change line 449 in your pastebin to make it look like

    BEFORE:
    $dog->id."\ name=\""
    AFTER:
    $dog->id."\" name=\""

    If you prefer to keep my code, comment out line 196. You may have a module that is trying to modify headers after the echo statement at line 196 that is producing that petfinder link.

    I suggest that you remove that petfinder link. You do not want to expose your API key

    Thread Starter jewelsmac6

    (@jewelsmac6)

    That worked! The name now clicks through and the extra code at the top disappeared.

    And to make the link open as target=”_blank”, I can add that into that same line, right?

    You’re probably right about the versions. My wordpress is version 3.6.1.

    Yup, you can add the target attribute. Just make sure to escape the quotes so it looks like target=\"_blank\". You can add it between the a and href tag.

    Thread Starter jewelsmac6

    (@jewelsmac6)

    Perfect, you are a hero! Thank you very much for your help with this! ??

    Now if only we could remove the full description… but we can tackle that another time!

    No problem, hiding the description is easy. You can either comment out lines 313 and 443, or add to your style sheet (css)
    .description{
    display:none;
    }

    Thread Starter jewelsmac6

    (@jewelsmac6)

    A hero again! I added that into the CSS, to keep it simple. This is fully resolved!

    If you’re up for one more, I replied back to you in the other thread ??
    https://www.ads-software.com/support/topic/list-new-additions-first?replies=9#post-4765337

    The edit at line 225 worked for me! I’m not great with php syntax so that would have taken me a while, not to mention quite a few lines look the same. Thanks so much rawrzors ??

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Remove pet description and link to petfinder’ is closed to new replies.