前言介紹
- 這款 WordPress 外掛「List Petfinder Pets」是 2012-06-12 上架。
- 目前有 500 個安裝啟用數。
- 上一次更新是 2024-11-13,距離現在已有 171 天。
- 外掛最低要求 WordPress 3.0 以上版本才可以安裝。
- 有 11 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
內容簡介
nder API v2.0 uses: ‘adoptable’, ‘adopted’, and ‘found’. If you are using the status attribute, please update it to use one of the new values. Leave empty to display all.
Frequently Asked Questions
What is a shelter id?
A shelter id is a unique identifier for your shelter on the Petfinder platform. You can find it in your Petfinder account under your shelter information. You need this id to display your pets on your website using this plugin.
How do I get a Petfinder API key and secret?
You can get a free API key and secret for Petfinder by signing up for an account on their website. Once you have an account, you can access your API key and secret in your account settings.
Do I need to edit my Petfinder settings to use this plugin?
You may need to go into your Petfinder account settings and enable sharing your data with third parties in order for this plugin to work properly. Instructions for how to do this can be found on the Petfinder API documentation page.
Can I customize the appearance of the pet listing?
Yes, you can use CSS to style the div containing the pets. You can also use the ‘css_class’ attribute with the shortcode to set your own class name on this div for even more control over the styles.
Can I list pets from multiple shelters?
You can only display pets from one shelter at a time using this plugin, but you can use the ‘shelter_id’ attribute with the shortcode to list pets from a different shelter on a specific page.
原文外掛簡介
Petfinder is a free site where shelters and rescues can post pets for adoption. The List Petfinder Pets plugin takes advantage of the Petfinder API to list your available pets on your website. All you need is your Petfinder shelter id and free Petfinder API v2.0 API key and secret.
The List Petfinder Pets plugin allows you to:
Display all your shelter’s Petfinder pets on your own website
Display a featured or random pet from Petfinder in a widget
Sign up to be notified when the Petfinder plugin is updated
You can sign up to receive notices when this plugin is updated or other important changes here: (https://unboxinteractive.com/petfinder-plugin-email-list/)
Demos
Midwest Italian Greyhound Rescue
Shortcode
[shelter_list] displays a list of pets from your shelter. You must enter your shelter ID, Petfinder v2.0 API key and secret on the List Petfinder Pets’ settings page for this shortcode to work. You may also need to edit your Petfinder settings to enable sharing your data with third parties. See Petfinder settings under Frequently Asked Questions below.
Optional attributes for shortcode are:
shelter_id – Allows you to list adoptable pets from a shelter different from the shelter id defined in your List Petfinder Pets Settings.
breed – If you wish to list only one breed on a page, or leave blank/don’t set to get all breeds. Note: adding ! before breed to exclude breeds was removed when plugin was updated to support Petfinder API v2.0 in version 1.0.13.
count – The maximum number of pets to return. Defaults to 75 and must be a number. Petfinder API v2.0 added ability to filter before retrieving results so you can set the count to the real number you want to list on the page now. Max returned is 100.
page – Which page of pets to return. If you have over 100 pets, or want to break up your pets into multiple pages, you can put the shortcode on multiple pages, each with a different page number. You’ll need to add a link to each page so your users can navigate between pages. NOTE: Don’t set ‘sort_by’ parameter when using page. Sorting only sorts the pets returned on the current page. Petfinder does not provide a way to sort by pet’s name. It can only sort by recent and distance in the initial call. I sort by name after the results are returned so it won’t work with paging.
animal – Type of animal. Value should be one of the following or blank/don’t set to get all: Dog, Cat, Rabbit, Small & Furry, Horse, Bird, Scales, Fins & Other, Barnyard.
include_info – Value should be set to “yes” or “no”; default is “yes”. If set to “yes”, Breeds, Spayed/Neutered, Up-to-date with routine shots, Housebroken, kid safe, cat safe, dog safe, special needs are displayed in list below photo thumbnails. Each list item has a different CSS class so you can hide any you do not want to show.
css_class – Set your own class name on div containing all pets. The default value is ‘pets’. This allows you to control the styles separately on different pages.
status – For backwards compatability values can be one of [A, H, P, X], and new values of [adoptable, adopted, found]. Petfinder API V1 used: ‘A’ = adoptable, ‘H’ = hold, ‘P’ = pending, ‘X’ = adopted/removed. Petfinder API V2 only accepts adoptable, adopted, and found, so values of H and P switch to adoptable now.
sort_by – Value can be: newest, last_updated or name. Value can also be set globally in Petfinder Settings.
age – Accepts values of: baby, young, adult, or senior. Can separate with commas to display pets that match more than one age group. If not set, will display pets from all age groups.
Note – parameter include_mixes was removed with Petfinder API v2.0 in plugin version 1.0.13
Note – parameter contact was removed with version 1.0.19.
Example:
[shelter_list breed=”Italian Greyhound”] – other breeds are not displayed
Example: [shelter_list count=20 page=1] and on another page [shelter_list count=20 page=2] – would list the first 20 pets on page with first shortcode, and the 2nd 20 pets on page with second shortcode.
Example using all attributes: [shelter_list shelter_id=”WI185″ breed=”Italian Greyhound” count=75 page=2 animal=”Dog” include_info=”no” css_class=”cats” status=”adoptable” sort_by=”newest” age=”baby”]
You can also list a single pet with the following shortcode
[get_pet pet_id=”numeric value”]
pet_id – Required. You can get this id from the pet’s Petfinder URL. URL will look like the following: https://www.petfinder.com/dog/nanook-45732995/mo/kansas-city/missouri-kansas-ig-rescue-mo306/ – 45732995 is the pet_id.
css_class – Set your own class name on div containing single pet. The default value is ‘pets’. This allows you to control the styles separately on different pages.
include_info – Value should be set to “yes” or “no”; default is “yes”. If set to “yes”, Breeds, Spayed/Neutered, Up-to-date with routine shots, Housebroken, kid safe, cat safe, dog safe, special needs are displayed in list below photo thumbnails. Each list item has a different CSS class so you can hide any you do not want to show.
Example using all attributes: [get_pet pet_id=”23367571″ include_info=”no” css_class=”cats”]
Widget
Add the List Petfinder Pets Featured Pet widget under Appearance -> Widgets. After adding the widget to a widget area you can set a featured pet id to display a featured pet, or leave blank to display a random pet from your shelter.
Featured Pet Widget Settings:
Featured Pet ID – You can get this id from the pet’s Petfinder URL. URL will look like the following: https://www.petfinder.com/dog/nanook-45732995/mo/kansas-city/missouri-kansas-ig-rescue-mo306/?referrer_id=cca97ef9-e23d-4d0b-b29d-52afa8f7d70e – 45732995 is the pet id.
Your Listing Page URL – The page where your shortcode [shelter_list] can be found. If this is set, your featured pet will link directly to this pet on your shelter list page. (Optional)
Featured Pet Image Size – The size of the Featured Pet image. (Required)
Featured Pet PDF Link – If you would like to create a PDF with more information about your Featured Pet. Link to the PDF uploaded separately through WordPress’ Media here.
Filters
Need to change your pets’ description? Perhaps you want to remove/replace special characters that are not displaying correctly, or want to add a paragraph to the end of all pets’ descriptions? You can do so with the following filter. Add it to your functions.php file. The filter name is petf_replace_description and it acts on all pets’ descriptions.
function replace_pet_description( $description ) {
return $description . ” Add me to end of all pets’ descriptions”;
}
add_filter( ‘petf_replace_description’, ‘replace_pet_description’ );
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「List Petfinder Pets」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0 | 1.1 | 1.0.1 | 1.0.2 | 1.0.3 | 1.0.4 | 1.0.5 | 1.0.6 | 1.0.7 | 1.0.8 | 1.0.9 | 1.1.1 | 1.1.2 | 1.1.3 | 1.1.4 | 1.1.5 | trunk | 1.0.10 | 1.0.11 | 1.0.12 | 1.0.13 | 1.0.14 | 1.0.15 | 1.0.16 | 1.0.17 | 1.0.18 | 1.0.19 |
延伸相關外掛(你可能也想知道)
PetPress 》PetPress 外掛讓 PetPoint 的使用者能夠建立他們收容所所有動物的列表和詳細資訊頁面。透過使用 shortcode ,您可以按物種列出收容所位置的動物,或者您可以...。
WP Petfinder 》u. This is where you can set the API key for Petfinder.com and customize the plugin settings., Petfinder API Key: enter your API key to access the ...。
PF404 for PetFinder 》使用PF404 for PetFinder可以替換您的通用404頁面,並將其替換為可供領養的動物。您可以在狗、貓、鳥、爬蟲類、馬、小型和毛茸茸,甚至農場動物之間進行選擇...。