Notice: This forum has become difficult to maintain and will no longer be supported.
If you have a current account, please open a ticket. If you have questions about the free version of AWPCP, please post in the WordPress.org forum and our team will respond there.

Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
How to use Custom Styles with AWPCP
July 13, 2019
5:52 pm
Bobbie Devereux
Moderator
Members

Moderators
Forum Posts: 3
Member Since:
June 22, 2017
sp_UserOfflineSmall Offline

Customizing the Style of AWPCP

AWPCP allows website owners to override the CSS rules included in the plugin by using a special stylesheet stored in the current active theme directory, the parent theme directory or the plugins directory.

How to use the AWPCP custom stylesheet file:

Create a file called awpcp-custom.css in one the following locations:

The current active theme directory (See get_stylesheet_directory()).
The parent theme directory (See get_template_directory()).
wp-content/plugins or wherever plugins are stored (See WP_PLUGIN_DIR).
Place any style changes you need in this file. It will be loaded such that these changes will take precedence in the CSS hierarchy over other styles in AWPCP.

How do I know what I want to put in this file?

Good question! Use the Firefox Developer Tools or Chrome Developer Tools to determine what styles are being applied to any given element. Once you know what rules are causing an issue, you can override them adding your own rules to the custom stylesheet.

What if I see custom hard-coded styling I can’t override?

You may see something like this in your output of the ads:

<div style="width:80px;padding:5px;float:left;margin-right:20px;"><!-- ... --></div>
That can be controlled from Classifieds Admin > Settings > Display > Layout and Presentation Ad/Listing settings page by altering the HTML templates in the Single Ad page layout or Ad Listings page layout settings. As long as you create valid HTML in there, you can change the templates to be anything you like.

Forum Timezone: America/Denver
Most Users Ever Online: 426
Currently Online:
Guest(s) 27
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Member Stats:
Guest Posters: 631
Members: 22782
Moderators: 3
Admins: 2
Forum Stats:
Groups: 1
Forums: 4
Topics: 7431
Posts: 33061
Newest Members:
John OBrien
Moderators: awpcp: 7530, AWPCP Support: 6207, Bobbie Devereux: 3
Administrators: awpcp: 300, Steph Wells: 0