Adopt-a-Pet Code Snippets – WordPress

There are two ways of inserting a searchable listing of pets on Adopt-a-pet onto your website:

  1. Install the following WordPress plugin: https://wordpress.org/plugins/pet-adoption-listings/
  2. Custom-code the CSS.

This article discusses #2. More information is available here.

What you’ll need

First, you need your Adopt-a-Pet.com shelter account unique ID number.
You can see that number on your Pet List Links page:
https://www.adoptapet.com/animal-shelters

Look for the number in the links. For example, in if we search for Rescue Well: 

When we click on the link, we’ll see:

https://www.adoptapet.com/adoption_rescue/90239-well-placed-pet-rescue-well-baltimore-maryland#featured <– 90239 is the ID number.

Code Snippets

If we update the following code snippet and replace IDNUMBERGOESHERE with 90239. 

<iframe src=”https://searchtools.adoptapet.com/cgi-bin/searchtools.cgi/portable_pet_list?shelter_id=IDNUMBERGOESHERE&amp;title=&amp;color=green&amp;clan_name=&amp;size=450x320_list&amp;sort_by=pet_name&amp;hide_clan_filter_p=” width=”100%” height=”1000″></iframe>

 

 

Alternatively, you can present a single animal; however, the layout will be different:

Dogs

<iframe src=”https://www.adoptapet.com/cgi-bin/public/petsearch.cgi/search_pets_by_shelter?shelter_id=90239&amp;clan=dog” width=”100%” height=”1500″></iframe>

Cats

<iframe src=”https://www.adoptapet.com/cgi-bin/public/petsearch.cgi/search_pets_by_shelter?shelter_id=90239&amp;clan=cat” width=”100%” height=”1000″></iframe>

Rabbits

<iframe src=”https://www.adoptapet.com/cgi-bin/public/petsearch.cgi/search_pets_by_shelter?shelter_id=90239&amp;clan=rabbit” width=”100%” height=”400″></iframe>

 

… and if all else fails, you can install the WordPress plugin. The parameters are:

[

pet_adoption_listings

shelter_id=”IDNUMBERGOESHERE”

iframe_width=”100%” (<- Remember to always set this to 100% or less, to enable dynamic adjustments.)

iframe_height=”1000″

]

 

(Just remove the line breaks and add your shelter ID number.) This is how it will appear, once the widget is installed:

Good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *