August 9, 2013
From the Questions & Answers: How to Put Latest CLassifieds on any page without using the widget
For anyone who needs the php code to show the latest classified ads it is shown below:
Special Note: You will need to have the most recent update of the file functions_awpcp.php. (Download from WP site)
Break down of the array values
* The first array value should be the number of items you want to show
* The second array value is the title you want to use
* The third array value (shown empty here) is the code that precedes the widget, such as an opening div class reference
* The fourth array value (shown empty here) is the code that closes the widget, such as an closing div class reference
* The fifth array value is the code that precedes the title (using the opening <h2> header element here).
* The sixth array value is the code that closes the title (using the closing </h2> header element here).
As of 3.0.x, We now use a subclass of WP_Widget to create our widgets. The code below should work:
The first argument is an array of layout options. The second argument allows users to control the information that will be shown in the Widget's output.
title: Widget Title
limit: number of Ads to show
show-title: set to true to show Ad title.
show-excerpt: set to true to show Ad excerpt.
show-images: set to true to show Ad image.
show-blank: set to true to show default "No Ad Image" image, if no image is available.
Most Users Ever Online: 163
Currently Browsing this Page:
Johnny B: 140
NAIN KHAN: 93
Guest Posters: 33
Newest Members:kasanya chavula, [email protected], Michael, [email protected], [email protected], Craig Taylor, sergeyfirsov, Muhammad Aliyan, tweetybird, Juio765
Moderators: awpcp: 7530, AWPCP Support: 5410, Bobbie Devereux: 0
Administrators: wpengine: 0, awpcp: 300