Loop with slider (slider not loading)

The simplest explanation is that the HTML rendered in your code does not match what you’re actually looking for. Without seeing the JS responsible for the slider, it’s impossible to say where you went wrong, but you should compare the mocked-up version (that works) with what you’re actually getting (HTML source after page render) to … Read more

sticky post in custom loop

if you use ‘post__in’ => get_option(‘sticky_posts’) then you are only filtering on posts that are sticky. As mrwweb said you need to look at your query. Then think of the ‘loop’ you want. Do you want to show all posts in a specific query or all posts that are sticky in all categories? You might … Read more

Displaying Latest Posts on a Page

You can modify your post template (usually index.php, but depends on your theme) to: check if the current request should response those posts add a segment which will query the database to retrieve the posts you wish echo the post title and excerpt as you wish The following code will query the database and return … Read more

Custom post type not displaying content from single-{custom post type} page

You need to rename loop-{custom-post-type}.php to single-{custom-post-type}.php. And to be explicit, the actual filename, based on your code above, should be: single-vfic_publications.php. Get rid of any other template redirects or anything else similar that you’re using. As per the Template Hierarchy, if you have a Custom Post Type named vfic_publications, and a template file named … Read more

Checking if Post Title is Unique as Loop Criteria

In case anyone’s wondering I managed to get this fixed with a pointer about using var_dump(). Here’s the modified loop. function build_home_id ($pcode_id, $assigned_id_no) { //$cmplt_id = $pcode_id . “-” . number_pad($assigned_id_no, 3); // Gets postcode string and calls the number padding function to add the leading 0’s do { $cmplt_id = $pcode_id . “-” … Read more

Having a Function Inside of the Loop

Before continuing, please read this: http://www.slideshare.net/andrewnacin/you-dont-know-query-wordcamp-netherlands-2012 It’s by a core WordPress developer and you should consider it required reading. You should never use query_posts, and it’s important to understand how to use loops correctly. That presentation will demonstrate the best practices, how, and why to use them. I can see the approach you’ve taken, what … Read more

I would like to have different styles for my posts based on the content of each post

Depending on which ‘types’ you need, you might be looking for the Post Format functionality. It allows you to set posts as standard, quotes, galleries, etc (sort of like Tumblr). To activate it, simply toss this into your theme (probably functions.php): add_theme_support( ‘post-formats’, array( ‘aside’, ‘gallery’, ‘quote’ ) ); Then, in your templates, you’ve got … Read more

Posts in loop displaying all taxonomies

You are a victim of WordPress’ great naming scheme. You don’t need get_terms(), but get_the_terms(). Note the the? That makes a huge difference. get_terms( $taxonomies, $args=”” ): Retrieve the terms in a given taxonomy or list of taxonomies. All terms. get_the_terms( $id, $taxonomy ): Retrieve the terms of the taxonomy that are attached to the … Read more