Sometimes transitional content is used in one area of a website, like to display hours in a Header or Sidebar. Instead of having the client (or yourself!) update this content every day, get your code to update it for you when the weekdays change.Read More
Drop the below if statement within a loop and add a count for each colour change that you need with the template.
This is a great example to reference if you’re building a scrolling website, and loading all pages in a single progression with alternating templates applied.Read More
echo apply_filters('the_content', get_post_field('post_content', $post_id));
Update – July 28, 2015
This method can also be used to retrieve data from custom fields when working with plugins like Advanced Custom Fields:
echo apply_filters('widget_content', get_post_field('widget_content', $post->ID));
Using large sliding banners with linked content can be both a blessing and a curse. This adds a beautiful level of style and information to the site, but also takes up a lot of space, and provides a lot of repetitive information that can be difficult for new visitors to navigate.Read More
Using the_date(); this is very easy to achieve, all you need is © to get yourself setup. To take it a step further, you can include a date span, so your clients are aware of just how long you’ve been burning the midnight oil.
<p>© 2013 <?php date('Y') == "2012" ? $year = "" : $year = "- ".date('Y'); echo $year; ?></p>
Sourced here.Read More
November 06, 2014
October 20, 2014
October 15, 2014
Place this within the single.php template to grab the Featured Image and format it automatically inline with the content.
the_post_thumbnail('large', array('class' => 'alignright'));
This can also be used in the loop with alongside posts with featured images.Read More
I’ve run into problems several times where exclude and include do not work, or work selectively, and as a result, either all of the posts are included, or none of them are. I’ve found an answer that works both inside and outside of the loop.Read More