Jquery solution:
**assuming your posts are in a division with the class of “post”.
<script type="text/javascript">
$(document).ready(function(){
$(".post p").each(function(){
$(this).addClass('paragraph');
});
$(".post ul").each(function(){
$(this).addClass('list');
});
//add more lines here to select more elements
});
</script>
Paste this in your footer.
*you need jquery installed. And better yet would be to enque this using http://codex.wordpress.org/Function_Reference/wp_enqueue_script
Related Posts:
- Set posts of a custom post type to be private by default?
- modify all posts of a category to “no comments allowed”
- How can I add dropdown widget/box to admin post page?
- Limit Authors to their Own Posts on front-end excluding admins
- Multiple Content Block
- Notice: Undefined index: suppress_filters
- Is it possible to store Custom Post Type data in separate set of tables and still have wp_post class functionality?
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Allow users to create posts without logging in?
- How to change “post_class()” for a custom post type?
- Showing custom post type categories in the menu
- WordPress notification if new post published
- Get post format
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Display author box on just certain category posts?
- Enable comments for post when comments meta box removed
- redirect after submiting post for review
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- Correct way adding External classes to Custom Post type and output their methods to template
- subtracting the current post form then whole loop, which is generating all CPT titles
- When post is Published, insert into custom table a number – custom post type
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Work and Display a Custom Post Type as a normal Post
- How to create a discussion post when a custom post is created?
- Featured image in custom post is being disabled
- Comments are not working on Custom Post Type
- Error 403 when posting comments to a custom post type from a different page
- How to make a non-public post on wordpress approval?
- How to get all posts except for one post from a certain custom post type?
- count_many_users_posts except current logged in user?
- How can I show a custom post type for users in the authors.php file?
- Loading all files within a directory
- Count all comments of a custom post type
- Blog page showing same content as homepage
- Modifying Custom Post Type after registration (will it affect content?)
- Custom Post Types relationships
- apply filters only to specific post listing without check the url parameters
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Custom post type and body_class: Remove “blog” class
- WordPress Orderby Numeric Value Not Working
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Create a post in custom post type using field in registration form after users submit form
- Exclude child pages from archive.php
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- is there a way to retrieve posts that do not have a featured image assigned?
- Auto-generated posts not showing in backend (but being counted!)
- Filter categories of posts with checkboxes
- Shortcode for display posts on home page show only one post
- Deleting Custom Post type data using mySQL command
- Find the user who initially created the post
- Copy custom field value to post title
- Need help targeting a custom post type with conditional tags
- How to get the post type from a category id?
- Insert HTML inside link in a walker
- right_now_content_table_end function not working?
- custom comments on specific post type
- WooCommerce product search titles only
- How to Separate CPT From Regular Posts?
- Insert data on comment post
- Remove rows in the manage post/page view
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- How to create custom boxes with text inside?
- How to add post_type=value when editing that post type in the WordPress admin?
- wp_insert_post generates endless posts
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Remove standard meta boxes from custom taxonomy
- Open Custom Post Type as PDF
- Using The REST API How To Pull All Custom Posts?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- What’s the difference between same wp functions get_posts(); functions in different form?
- I did group my search results by post type, but how can i give each of them its own order?
- Dequeue scripts and styles only for specific custom post type
- Function to display custom post type on front page makes menu items dissapear
- custom post type not showing in menu
- Show the same Article Available in Other Categories
- Getting posts under the custom post type ui category
- Show category ID on custom post type
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- How to customize a permalink (URL) structure?
- Display only one post each WEEK
- Custom Post Type with Templates using Meta Boxes?
- List children on child post
- get_comments not working on custom post types
- Can I list a custom post type within another custom post type in the admin area?
- Restrict custom post type from appearing with ?post_types=
- Change custom post type slug from plugin options
- Show custom post type filtered by category
- different post-class when template is loaded via ajax
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- Custom Post Type Set Comments ON by default without show METABOX
- Display random posts, but omit the post it is on?