Valid Field Codes | FAQ | Support Forum

A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Valid Field Codes
June 1, 2010
4:02 pm
awpcp
Moderator
Moderators
Forum Posts: 7530
Member Since:
August 9, 2013
sp_UserOfflineSmall Offline

FIELD CODE LIST FOR 2.2.1. See the bottom of this thread for AWPCP 3.0+

Valid codes for the show ad page layout

$ad_title
$featureimg
$codecontact
$adcontact_name
$adcontactphone
$location
$aditemprice
$awpcpextrafields
$awpcpvisitwebsite (only valid in 1.0.6.8 or higher)
$showadsense1
$addetails
$showadsense2
$awpcpshowadotherimages
$awpcpadviews
$showadsense3
$ad_startdate
$ad_postdate
$ad_categoryurl
$ad_categoryname
$city (in 1.8.9.2 and higher)
$state (in 1.8.9.2 and higher)
$country (in 1.8.9.2 and higher)
$village (in 1.8.9.2 and higher)

Valid codes for the display ad listings page layout

$addetailssummary
$ad_title
$awpcpadpostdate
$awpcp_state_display
$awpcp_display_adviews
$awpcp_city_display
$awpcp_display_price
$ad_categoryname (in 1.8.7.2 and higher)
$city (in 1.8.9 and higher)
$state (in 1.8.9 and higher)

January 6, 2014
7:36 pm
awpcp
Admin
Forum Posts: 297
Member Since:
April 29, 2012
sp_UserOfflineSmall Offline

UPDATE as of Jan 6, 2014:

Placeholders

Placeholders are special words that you can use in the Singe Ad layout and Listings layout settings to show information about your Ads. If you are using AWPCP 3.0 or higher, all (new and legacy) placeholders are available to use both in the Single Ad layout and the Listings layout. If you are using AWPCP 2.2.1 or earlier, you can only use legacy placeholders. There is a list of legacy placeholders available in the Single Ad layout and other list of legacy placeholders available in the Listings layout.

Placeholders added in AWPCP 3.0

  • $url:

  • $title:

    Test Title
  • $website_url:

  • $website_link:

    <a rel=”nofollow” href=”http://awpcp.com” target=”_blank”>Visit Website</a>
  • $category_url:

  • $category_name:

    General
  • $contact_url:

  • $contact_phone:

    5555555
  • $contact_name:

    Test Contact Name
  • $details:

    Test Ad Details.
  • $price:

    €100,00
  • $city:

    Miami
  • $state:

    Florida
  • $county:

    Miami-Dade
  • $country:

    USA
  • $region:

    Miami, Florida, USA
  • $thumbnail_width:

    80px
  • $featured_image:
    <div class="awpcp-ad-primary-image" style="float:right;">
        <a class="thickbox thumbnail" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans4-primary.png">
        </a>
        <a class="thickbox enlarge" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">Click to enlarge image.</a>
    </div>
    
  • $images:
    <ul class="awpcp-single-ad-images">
        <li class="">
            <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans5-large.png">
                <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans5.png">
            </a>
        </li>
        <li class="">
            <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans6-large.png">
                <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans6.png">
            </a>
        </li>
        <li class="">
            <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans7-large.png">
                <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans7.png">
            </a>
        </li>
        <li class="">
            <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">
                <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans4.png">
            </a>
        </li>
    </ul>
    
  • $start_date: The start date in the format specified in the settings (e.g.

    Friday May 3, 2013

    ).

  • $end_date: The end date in the format specified in the settings (e.g.

    Friday May 3, 2013

    ).

  • $posted_date: The date when the Ad was posted in the format specified in the settings (e.g.

    Friday May 3, 2013

    ). (Added in 3.2)

  • $last_updated_date: The date the Ad was updated for the last time, in the format specified in the settings (e.g.

    Friday May 3, 2013

    ).  (Added in 3.2)

  • $renewed_date: The date the Ad was renewed, in the format specified in the settings (e.g.

    Friday May 3, 2013

    ).  (Added in 3.2)

  • $twitter_button:
    <div class="tw_button awpcp_tweet_button_div">
        <a href="http://twitter.com/share?url=http://plugin.awpcp.com/awpcp/show-ad/?id=13&amp;text=Test Title" rel="nofollow" class="twitter-share-button" target="_blank">Tweet This</a>
    </div>
    
  • $facebook_button:
    <div class="tw_button awpcp_tweet_button_div">
        <a href="http://www.facebook.com/sharer.php?s=100&amp;p[images][0]=http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4.png&amp;p[images][1]=http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans5.png&amp;p[images][2]=http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans6.png&amp;p[images][3]=http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans7.png&amp;p[url]=http://plugin.awpcp.com/awpcp/show-ad/?id=13&amp;p[title]=Test Title&amp;p[summary]=Test Ad Details." class="facebook-share-button" title="Share on Facebook" target="_blank"></a>
    </div>
    
  • $flag_link:

    &lt;a id=”flag_ad_link” href=”#” onclick=”return flag_ad(13)”&gt;Flag Ad&lt;/a&gt;
  • $views:

    1
  • $adsense:

    &lt;!– adsense code from settings –&gt;
  • $extra_fields:

    &lt;!– extra fields values –&gt;

Legacy placeholders for Single Ad layout

  • $ad_title:

    &lt;a href=”http://plugin.awpcp.com/awpcp/show-ad/?id=13″&gt;Test Title&lt;/a&gt;
  • $ad_categoryurl:

  • $ad_categoryname:

    General
  • $adcontactphone:

    &lt;br&gt;&lt;label&gt;Phone&lt;/label&gt;: 5555555
  • $adcontact_name:

    Test Contact Name
  • $codecontact:

  • $addetails:

    Test Ad Details.
  • $awpcpvisitwebsite:

    &lt;br&gt;&lt;a rel=”nofollow” href=”http://awpcp.com” target=”_blank”&gt;Visit Website&lt;/a&gt;
  • $city:

    Miami
  • $state:

    Florida
  • $village:

    Miami-Dade
  • $country:

    USA
  • $location:

    &lt;br&gt;&lt;label&gt;Location&lt;/label&gt;: Miami, Florida, USA
  • $aditemprice:

    &lt;div class=”showawpcpadpage”&gt;&lt;label&gt;Price&lt;/label&gt;: &lt;strong&gt;€100,00&lt;/strong&gt;&lt;/div&gt;
  • $featureimg:
    <div class="awpcp-ad-primary-image" style="float:right;">
        <a class="thickbox thumbnail" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans4-primary.png"></a>
            <a class="thickbox enlarge" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">Click to enlarge image.</a>
    </div>
    
  • $awpcpshowadotherimages:
    <li class="">
        <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans5-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans5.png">
        </a>
    </li>
    <li class="">
        <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans6-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans6.png">
        </a>
    </li>
    <li class="">
        <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans7-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans7.png">
        </a>
    </li>
    <li class="">
        <a class="thickbox" href="http://plugin.awpcp.com/wp-content/uploads/awpcp/awpcp-credit-plans4-large.png">
            <img class="thumbshow" src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans4.png">
        </a>
    </li>
    
  • $ad_startdate:

    05/03/2013
  • $ad_postdate:

    05/03/2013
  • $showadsense3:

    &lt;!– adsense code from settings –&gt;
  • $showadsense2:

    &lt;!– adsense code from settings –&gt;
  • $showadsense1:

    &lt;!– adsense code from settings –&gt;
  • $flagad:

    &lt;a id=”flag_ad_link” href=”#” onclick=”return flag_ad(13)”&gt;Flag Ad&lt;/a&gt;
  • $awpcpadviews:

    &lt;div class=”adviewed”&gt;This Ad has been viewed 0 times.&lt;/div&gt;
  • $awpcpextrafields:

    &lt;!– extra fields values –&gt;

Legacy placeholders for Listings layout

  • $url_showad:

  • $imgblockwidth:

    80px
  • $ad_title:

    &lt;a href=”http://plugin.awpcp.com/awpcp/show-ad/?id=13″&gt;Test Title&lt;/a&gt;
  • $addetailssummary:

    Test Ad Details.summary
  • $city:

    Miami
  • $state:

    Florida
  • $awpcp_image_name_srccode:
    <a href="http://plugin.awpcp.com/awpcp/show-ad/?id=13">
        <img src="http://plugin.awpcp.com/wp-content/uploads/awpcp/thumbs/awpcp-credit-plans4-primary.png" width="80px" border="0" alt="Test Title">
    </a>
    
  • $awpcp_display_price:

    Price: €100,00
  • $awpcp_country_display:

    USA&lt;br&gt;
  • $awpcp_state_display:

    Florida&lt;br&gt;
  • $awpcp_city_display:

    Miami&lt;br&gt;
  • $awpcp_display_adviews:

    Total views: 0&lt;br&gt;
  • $awpcpadpostdate:

    05/03/2013&lt;br&gt;
May 8, 2015
2:41 pm
awpcp
Admin
Forum Posts: 297
Member Since:
April 29, 2012
sp_UserOfflineSmall Offline

NEW Field Codes available with BuddyPress module installed (only):

$bp_user_profile_url: returns the URL to the BuddyPress profile for the owner of the listing being displayed.

$bp_user_listings_url: returns the URL to the list of listings of the owner of the listing being displayed.

$bp_username: returns the username, as displayed in BuddyPress screens, of the owner of the listing being displayed.

August 6, 2015
3:03 pm
awpcp
Admin
Forum Posts: 297
Member Since:
April 29, 2012
sp_UserOfflineSmall Offline

NEW field codes available if you’re running Extra Fields 3.5.1+:

The new version of Extra Fields now offer three new placeholders for each registered extra field:

  1. $x_<field_name>_label

    : Returns the label of the field. If follows the setting that controls wether HTML is shown or not.

  2. $x_<field_name>_value

    : Returns the value of that field for the listing being shown. If the value uses a URL, Email, Money or Date validator, the returned value will be formatted accordingly: A link for URL and Email fields and formatted strings according to plugin settings for Money and Date fields.

  3. $x_<field_name>_raw

    : Returns the raw value of that field for the listing being shown. In this case the plugin returns the values as they were entered by the owner of the listing; no format is applied.

The

<field_name>

is the value of the first column of the Extra Fields table in the admin dashboard:

Image Enlarger

Using the field shown in the screenshot above, the available placeholders would be:

$x_test_field_label

,

$x_test_field_value

,

$x_test_field_raw

.

Forum Timezone: America/Denver

Most Users Ever Online: 163

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Johnny B: 140

godie: 120

laburke: 94

NAIN KHAN: 93

salvig67: 84

kerdezo: 82

purplepaula: 72

rude: 72

gery: 71

WAYTOBAYWTB52: 71

Member Stats:

Guest Posters: 28

Members: 36627

Moderators: 2

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 6463

Posts: 29203

Newest Members:

Janey, cersin, Pixie, fabian, Thomas, kkkk, tomcleverley, Justin Handley, omasulah, Alejandro

Moderators: awpcp: 7530, AWPCP Support: 4420

Administrators: wpengine: 0, awpcp: 297

Skip to toolbar