Trying to split a query into sections of six

I think your approach is correct but you’re running into the “posts_per_page” problem. In your query, use ‘posts_per_page=-1’ to return all posts (assuming that’s what you want). I’m guessing your website is currently set to show 12 posts per page in the settings->reading area. http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

First post article different on Archives template

Just point to the first element of your list of articles using CSS pseudo class like this: PS. I’m so used to less that I’m gonna give you the .less syntax, but you can figure it out on your own right? .container-with-your-posts { > .post-container { &:first-child { h1 { your styles for the title … Read more

Php code error in wordpress if else statements [closed]

You have multiple syntax errors in your code, see comments in below code: Code: <?php $googleplay = get_option(‘director_googleplay’); ?> <?php if( $googleplay ) : ?> // use echo not print <a href=”https://wordpress.stackexchange.com/questions/133771/<?php echo $googleplay; ?>”> // rework your src/IMAGES statement // is this a constant/variable? <img src=”<?php echo IMAGES; ?>/googleplay.png” class=” img-responsive top-buffer-5″ alt=”Image”/> // … Read more

Adding Separator to Breadcrumbs

I’m not sure if you want it like this, however, this can be achieved by CSS. .crumbs > span > span + span { margin-left: 1em; } .crumbs > span > span + span:before { content: ‘|’; /* or something else */ *display: inline; display: inline-block; margin-left: -1em; width: 1em; text-align: center; } // EDIT … Read more

Wrap posts p tags in div

You need to add it to a JS file and then enqueue it in your functions.php jQuery(document).ready(function($){ $(‘p’).wrap(‘<div class=”post-txt” />’); }); If you already have a js file, you can add it to that file and you’re done. Else, save the above snippet in a new file. Put that file in a folder called js … Read more

Assign Custom classes to every Excerpt

Firstly, there are syntax errors in your (last block of) code. And secondly, you don’t need to add any specific class at all. Just use the post ID for each post: <article id=”post-<?php the_ID(); ?>”> <div class=”post-content”> <?php if (‘excerpt’ === $gantry->get(‘blog-content’, ‘content’)) : ?> <div class=”excerpt”> <?php the_excerpt(); ?> </div> <?php else : ?> … Read more

List all anchor links on a page

In short, you’ll run the loop twice. The first time creating the links. The second time creating the posts. The trick is to figure out what the ID will be for the post. It needs to be something unique: We could use the slug or the post ID. <?php // I’m going to get the … Read more