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 use a custom post type archive as front page?
- Get the ID of the latest post
- Change permalinks for posts but not for custom post types
- How make get_next_post() return first post when viewing last one
- Date archives for custom post type
- Getting a div content of a post in wordpress?
- Custom comment status possible?
- ascending order custom post type
- add_meta_box: Datepicker like the one for postdate?
- How to show post title outside of loop? [closed]
- How do you use JavaScript to detect the homepage
- Append taxonomy terms as class names in markup?
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Separate comment section for post type in dashboard
- GravityForm: Populate Dropdown with custom post type [closed]
- Trying to edit the single page from a Custom Post
- How to Submit Post Via cURL & PHP
- Count all comments of a custom post type
- apply filters only to specific post listing without check the url parameters
- is there a way to retrieve posts that do not have a featured image assigned?
- Insert data on comment post
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- Post image in WordPress not appearing on home page
- I need to add endpoint for wordpress categories
- Featured image overlay when changing post status
- Hide a widget inside a div on specific type of post
- Load Next WordPress Posts With AJAX?
- If there is only one post (show elements) else (show other elements)
- Custom post type menu
- Get current user id
- How do I edit the WordPress post.php file?
- Posts are not rendering perfectly [closed]
- How I can made a custom post type to page templates?
- Custom posts – tag pagination
- Adding custom post formatting options in custom post types
- List all posts in taxonomy term
- Custom meta box in custom post type not working
- how to redirect to a custom post template
- Post/Custom Post Type URL Access
- Function to add custom HTML into head in custom post-type list page
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- Adding /blog in front of single posts (only)
- Search CPT by tag ids
- Post template with breadcrumb needs to show page navigated from
- Define multiple prefixes for custom post type
- Publishing failed. The response is not a valid JSON response
- add all blog posts to folder
- How to show posts of the same category on a page?
- Create posts inside CPT post
- Need to display author’s email id in the “Edit post” field in wp dashboard. How do I do this?
- Populate custom post type/custom fields from an external database
- Custom Field to post_title
- Most efficient way of showing children posts?
- Custom post type with two templates
- Post Custom & Taxonomy 404 error
- One Post with different content, depending on a Page
- How To Display Category list from Portfolio post type plugin?
- How to display data with pagaination on backend?
- Edit post meta direct from post.php?
- How to Arrange Support => Thumbnail
- Turn off comments for given CPT checkbox?
- Allow authors to create article image
- How to delete unnecessary custom post types in the UI
- show the most recent date of all posts to display on front end
- Two pagination in one page without AJAX
- I want to show a list of post with title that have link goes to that post and icon under the specific category to which it belongs