How to add custom HTML markup and classes to the_content()?

This sounds like something that should be handled in CSS without using classes, for examples article blockquote { background-color: #fff; } Instead of adding .bg-white to the HTML tag. If you really want to add custom classes you could use a filter or get_the_content() and parse it manually.

jQuery cycle and WordPress: Captions, buttons, oh my

First: You should use an IDE like “Eclipse” or “PhpFireStorm”. Second: Re-reading your code is always a good advice – what’s missing in the next line? <img alt=”<?php the_title(); ?> image”https://wordpress.stackexchange.com/questions/26142/<?php echo get_post_meta($post->ID,”img_url’, true); ?” /> Third: You need to state global $post; at the beginning of your file, before you can access the provided … Read more

Implement “No related posts for this entry” into the loop?

I still can’t see how the code and the problem is substantially different from your original topic; however, try to add your text into the typical ‘else’ location for a loop if no posts are found; change this line: <?php endwhile; endif; ?> to: <?php endwhile; else : echo ‘<h3 class=”no-related-posts”>sorry but there are no … Read more

Custom Page Template and Category Exclusion

Try this code in your template. <?php /** * Template Name: Exclude Comic Category */ get_header(); ?> <div id=”primary”> <div id=”content” role=”main”> <?php query_posts( array( ‘category_name’ => ‘comic’, ‘paged’ => get_query_var(‘paged’), ‘posts_per_page’ => 5 ) ); ?> <?php if ( have_posts() ) : ?> <?php twentyeleven_content_nav( ‘nav-above’ ); ?> <?php while ( have_posts() ) : … Read more

Applying a filter to multiple loops for days ago

Define the filter_where function in your functions.php file in your theme. <?php function filter_where($where=””) { $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘-30 days’)) . “‘”; return $where; }