Parse error referring to an unexpected end of file - css

I was editing the css style sheet on my wordpress website and I got this parse error:
Parse error: syntax error, unexpected end of file in /home/youngt7/public_html/wp-content/themes/young/content.php on line 75
It says it's in the content.php portion, but I am having trouble finding the error. Here is the first lines of my content.php section (sorry it's a little long):
<article id="post-<php the_ID(); ?>" <?php post_class(); ?>
<?php if ( is_sticky() && is_home() && ! is_paged() ) : ?>
<div class="featured-post">
<?php _e( 'Featured post', 'twentytwelve' ); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php if ( ! post_password_required() && ! is_attachment() ) :
the_post_thumbnail('thumbnail', array('class' => 'alignleft'));
endif; ?><?php if ( is_search() ) : // Only display Excerpts for Search ?>
<?php if ( is_single() ) : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php else : ?>
<h1 class="entry-title">
<?php the_title(); ?>
</h1>
<?php endif; // is_single() ?>
<?php if ( comments_open() ) : ?>
<div class="comments-link">
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
</div><!-- .comments-link -->
<?php endif; // comments_open() ?>
</header><!-- .entry-header -->
<?php if ( is_search() ) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<?php twentytwelve_entry_meta(); ?>
<?php edit_post_link( __( 'Edit', 'twentytwelve' ), '<span class="edit-link">', '</span>' ); ?>
<?php if ( is_singular() && get_the_author_meta( 'description' ) && is_multi_author() ) : // If a user has filled out their description and this is a multi-author blog, show a bio on their entries. ?>
<div class="author-info">
<div class="author-avatar">
<?php
/** This filter is documented in author.php */
$author_bio_avatar_size = apply_filters( 'twentytwelve_author_bio_avatar_size', 68 );
echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
?>
</div><!-- .author-avatar -->
<div class="author-description">
<h2><?php printf( __( 'About %s', 'twentytwelve' ), get_the_author() ); ?></h2>
<p><?php the_author_meta( 'description' ); ?></p>
<div class="author-link">
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
<?php printf( __( 'View all posts by %s <span class="meta-nav">→</span>', 'twentytwelve' ), get_the_author() ); ?>
</a>
</div><!-- .author-link -->
</div><!-- .author-description -->
</div><!-- .author-info -->
<?php endif; ?>
</footer><!-- .entry-meta -->
</article><!-- #post -->
That's the entirety of the content.php, any and all help is appreciated. The error is stopping all my content, and I can't access it through the front end until I fix this.
Thanks,
William
p.s. my site is right here if you want to see this from the front end.

Related

FacetWP is braking masonry layout

I'm using FacetWP to build a filter form. Unfortunately, my masonry layout is braking when I select any option in the form. Results are presenting as a single column, instead of 3. Weird is that F5 makes the order (3 columns) right.
I was trying to use these methods: https://facetwp.com/documentation/template-configuration/ and this one: https://facetwp.com/using-facetwp-with-existing-template-files/
My code is
<div id="primary" class="content-area col-md-9 <?php echo sydney_blog_layout(); ?>">
<main id="main" class="post-wrap" role="main">
<?php
$args = array(
'post_type' => 'nieruchomosci',
'posts_per_page' => 12,
);
$query = new WP_Query( $args );?>
<?php if ( $query->have_posts() ) : ?>
<header class="page-header">
<h3 class="archive-title">Szukaj nieruchomości</h3>
</header><!-- .page-header -->
<div class="wyszukiwarka"><?php echo facetwp_display( 'facet', 'rodzaj' ); ?><?php echo facetwp_display( 'facet', 'typ' ); ?><?php echo facetwp_display( 'facet', 'lokalizacja' ); ?></div>
<div class="posts-layout facetwp-template">
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() && ( get_theme_mod( 'index_feat_image' ) != 1 ) ) : ?>
<div class="entry-thumb">
<?php the_post_thumbnail('sydney-large-thumb'); ?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php the_title( sprintf( '<h2 class="title-post entry-title">', esc_url( get_permalink() ) ), '</h2>' ); ?>
</header><!-- .entry-header -->
<div class="entry-post">
<?php the_field('cena'); ?> PLN | <?php the_field('powierzchnia'); ?> m<sup>2</sup></br>
<?php echo get_the_term_list( $post->ID, 'rodzaj', '', ', ', '' ) ?> na <?php echo get_the_term_list( $post->ID, 'typ', '', ', ', '' ) ?> w miejscowości <?php echo get_the_term_list( $post->ID, 'lokalizacja', '', ', ', '' ) ?>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'sydney' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-post -->
<footer class="entry-footer">
<?php sydney_entry_footer(); ?>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<?php endwhile; ?>
</div>
<?php the_posts_navigation(); ?>
<?php else : ?>
<?php get_template_part( 'content', 'none' ); ?>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
Any advice will be very nice.
Actually I got his to work (using Masonry PACKAGED v4.1.1 & imagesLoaded PACKAGED v3.1.8):
$(document).on('facetwp-loaded', function() {
var $grid = $( '.grid' ).imagesLoaded( function() {
$grid.masonry("reloadItems");
$grid.masonry( {
itemSelector : '.loop-entry',
gutter : 30,
columnWidth : 240,
isAnimated : true,
animationOptions : {
duration : 300,
easing : 'easeInOutCirc',
queue : false
}
});
});
});
Try reload layout on facetwp-loaded event. From your question it is unclear how a masonry layout was created. Assuming it is masonry.js, you can do layout when FacetWP finishes loading like this:
$(document).on('facetwp-loaded', function() {
// do layout when FacetWP finishes
$grid.masonry('layout');
});
Check more here
https://facetwp.com/documentation/facetwp-loaded/

Is it possible to remove a div if there is no featured image in wordpress?

Is there a way to tell the wordpress content page to show a div around content if there is a featured image and remove there div if there is not? I code Html and css but php is a blur to me. have mercy :) I currently have it to place a dummy thumbnail in place of a featured image if it does not exist. see below. thanks!!
<header class="entry-header">
<?php if ( is_search() || is_archive () || is_category () || is_tag () || is_home() ) : // Only display Excerpts for Search ?>
<?php if ( is_single() ) : ?>
<h1 class="entry-title post-title"><?php the_title(); ?></h1>
<?php else : ?>
<?php endif; // is_single() ?>
<?php if ( comments_open() ) : ?>
<!--<div class="comments-link">
<?php // comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
</div>--><!-- .comments-link -->
<?php endif; // comments_open() ?>
<footer class="entry-meta post-content">
<?php
if ( has_post_thumbnail() ) {
echo '<figure class="cat-thumb">';
the_post_thumbnail('category-thumb');
echo '</figure>';
}
else {
echo '
<figure class="placeholder-thumb">
<p><h1 class="entry-title"><?php echo single_post_title() ?></h1></p>
</figure>
';
}
?>
<div id="blogPostContent">
<p class="post-title"><?php the_title(); ?></p>
<div class="entry-summary">
<div class="postByLine">
<?php
$date = sprintf( '<time class="entry-date" datetime="%3$s">%4$s</time>',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
$author = sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'twentytwelve' ), get_the_author() ) ),
get_the_author()
);
echo ' Published on ' . $date . ' | By ' . $author . ' | ';
if ( comments_open() ) : ?>
<?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentytwelve' ) . '</span>', __( '1 Reply', 'twentytwelve' ), __( '% Replies', 'twentytwelve' ) ); ?>
<?php endif; // comments_open()
?>
</div>
<?php the_excerpt(); ?><span class="read_more">Read More</span>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentytwelve' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-links">' . __( 'Pages:', 'twentytwelve' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
</div>
</footer>
</header><!-- .entry-header -->
You seem to already know how to do this, honestly-- has_post_thumbnail().
For example:
if ( has_post_thumbnail() ) {
echo '<div class="thumb-only">';
}
// some code
if ( has_post_thumbnail() ) {
echo '</div>';
}
So long as this code is inside a Loop, it should work.
if( wp_attachment_is_image( $post_id ) ){ ... }
you can also use this for condition

Anchor is not working in wordpress,

I'm creating a custom theme, then a custom type, and when I try to put a (read more) link to the post, the anchor is not working. This is my code:
<main id="main" class="site-main" role="main">
<?php $temp_query = $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args=array(
'caller_get_posts'=>1,
'post_type' => 'enfant',
'paged'=>$paged
);
$wp_query = new WP_Query($args);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post();
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID));
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="top-cont">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<!-- first one --> <img src="<?php echo $src[0];?>" />
<?php
$terms = get_the_terms($post->ID, 'maladies', '', ', ','');
if ( !empty( $terms ) ){
$numTerm = 0;
echo "<h3>Maladie : </h3>";
echo "<p>";
foreach( $terms as $term ) {
$numTerm++;
if ($numTerm == 1){
echo " ".$term->name;
}
else{
echo ", ".$term->name;
}
}
echo "</p><br/>";
}
?>
<!-- second one --> <a href="<?php the_permalink() ?>" >Lire plus ...</a>
<p><?php the_excerpt(); ?></p>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'adelia' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<div class="foot"></div>
<!--<?php edit_post_link( __( 'Edit', 'adelia' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>-->
</article><!-- #post-## -->
<?php
// If comments are open or we have at least one comment, load up the comment template
/*if ( comments_open() || '0' != get_comments_number() )
comments_template();*/
?>
<?php endwhile; // end of the loop. ?>
both line commented are not working.
it is difficult to find out bug:
i have try something for you, hope it will works.
<main id="main" class="site-main" role="main">
<?php $temp_query = $wp_query;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args=array(
'caller_get_posts'=>1,
'post_type' => 'enfant',
'paged'=>$paged
);
$wp_query = new WP_Query($args);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post();
//$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID));
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="top-cont">
<h1 class="entry-title"><?php the_title(); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<!-- first one --> <img src="<?php echo wp_get_attachment_image_src( get_post_thumbnail_id($post->ID));?>" />
<?php
$terms = get_the_terms($post->ID, 'maladies', '', ', ','');
if ( !empty( $terms ) ){
$numTerm = 0;
echo "<h3>Maladie : </h3>";
echo "<p>";
foreach( $terms as $term ) {
$numTerm++;
if ($numTerm == 1){
echo " ".$term->name;
}
else{
echo ", ".$term->name;
}
}
echo "</p><br/>";
}
?>
<!-- second one --> <a href="<?php the_permalink() ?>" >Lire plus ...</a>
<p><?php the_excerpt(); ?></p>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'adelia' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<div class="foot"></div>
<!--<?php edit_post_link( __( 'Edit', 'adelia' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>-->
</article><!-- #post-## -->
<?php
// If comments are open or we have at least one comment, load up the comment template
/*if ( comments_open() || '0' != get_comments_number() )
comments_template();*/
?>
<?php endwhile; // end of the loop. ?>
Thanks.

All links and categories show my recent posts

When I click on any link on my blog the page and URL changes but still shows my recent posts, this is a custom theme I created from the 2010 theme earlier in the year and was working perfectly until recently.
The blog is here my blog
I'm sure it is a fundamental issue, has anyone had the same issue?
I originally thought it was a permalink issue but when I change theme the blog works properly.
Code from the loop.php template:
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-above" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-above -->
<?php endif; ?>
<?php /* If there are no posts to display, such as an empty archive page */ ?>
<?php if ( ! have_posts() ) : ?>
<div id="post-0" class="post error404 not-found">
<h1 class="entry-title"><?php _e( 'Not Found', 'twentyten' ); ?></h1>
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyten' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</div><!-- #post-0 -->
<?php endif; ?>
<?php
/* Start the Loop.
*
* In Twenty Ten we use the same loop in multiple contexts.
* It is broken into three main parts: when we're displaying
* posts that are in the gallery category, when we're displaying
* posts in the asides category, and finally all other posts.
*
* Additionally, we sometimes check for whether we are on an
* archive page, a search page, etc., allowing for small differences
* in the loop on each template without actually duplicating
* the rest of the loop that is shared.
*
* Without further ado, the loop:
*/ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php /* How to display posts in the Gallery category. */ ?>
<?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 <!--class="entry-title"-->><?php the_title(); ?></h2>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-content">
<?php if ( post_password_required() ) : ?>
<?php the_content(); ?>
<?php else : ?>
<?php
$images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
if ( $images ) :
$total_images = count( $images );
$image = array_shift( $images );
$image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );
?>
<div class="gallery-thumb">
<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a>
</div><!-- .gallery-thumb -->
<p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ),
'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"',
$total_images
); ?></em></p>
<?php endif; ?>
<?php the_excerpt(); ?>
<?php endif; ?>
</div><!-- .entry-content -->
<div class="entry-utility">
<?php _e( 'More Galleries', 'twentyten' ); ?>
<span class="meta-sep">|</span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display posts in the asides category */ ?>
<?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php twentyten_posted_on(); ?>
<span class="meta-sep">|</span>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><?php the_title(); ?></h2>
<div class="entry-meta">
<?php twentyten_posted_on(); ?>
</div><!-- .entry-meta -->
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<div class="entry-utility">
<?php if ( count( get_the_category() ) ) : ?>
<span class="cat-links">
<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php
$tags_list = get_the_tag_list( '', ', ' );
if ( $tags_list ):
?>
<span class="tag-links">
<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
</span>
<span class="meta-sep">|</span>
<?php endif; ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-utility -->
</div><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php endif; // This was the if statement that broke the loop into three parts based on categories. ?>
<?php endwhile; // End the loop. Whew. ?>
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'twentyten' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'twentyten' ) ); ?></div>
</div><!-- #nav-below -->
<?php endif; ?>
When you create a wordpress theme you must understand the Template Hierarchy or you'll have trouble setting page content. As you can see in the page I've linked wordpress has some basic rules that it fallows to display content from different template files. If one file is missing from the hierarchy, wordpress will fallback to the next one in hierarchy.In your case if you don't have category-{slug}.php the content displayed for a specific category will be the one generated by the category.php code.If you don't have category.php then wordpress will read archive.php and so on till index.php.If you want to display a specific loop make sure you have the code in the correct file and the file named with respect of the template hierarchy rules so it's code will run when you want it to run.
The reason my blog was showing the top 5 posts on every page was because I has the following line in the header file:
query_posts('showposts=5');
I used this in my main static part of the site so I could show the most recent 5 posts in my footer.
I have moved this code to my blog footer and all is working again.
Thanks for all your relpies.

Wordpress loop paging is showing page 1 results on all pages when paging

I am a wordpress n00b and am having issues with paging. I have the following "sample" loop code I am using:
<div id="content">
<?php /* Top post navigation */ ?>
<?php
$args = array(
'posts_per_page' => '25',
'cat' => '-33'
);
?>
<?php global $wp_query;
$wp_query = new WP_Query( $args );
$total_pages = $wp_query->max_num_pages;
if ( $total_pages > 1 ) { ?>
<?php } ?>
<?php /* The Loop — with comments! */ ?>
<?php while ( have_posts() ) : the_post() ?>
<?php /* Create a div with a unique ID thanks to the_ID() and semantic classes with post_class() */ ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php /* an h2 title */ ?>
<h2 class="entry-title"><?php the_title(); ?></h2>
<?php /* Microformatted, translatable post meta */ ?>
<div class="entry-meta">
<span class="meta-prep meta-prep-author"><?php _e('By ', 'hbd-theme'); ?></span>
<span class="author vcard"><a class="url fn n" href="<?php echo get_author_link( false, $authordata->ID, $authordata->user_nicename ); ?>" title="<?php printf( __( 'View all posts by %s', 'hbd-theme' ), $authordata->display_name ); ?>"><?php the_author(); ?></a></span>
<span class="meta-sep"> | </span>
<span class="meta-prep meta-prep-entry-date"><?php _e('Published ', 'hbd-theme'); ?></span>
<span class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php the_time( get_option( 'date_format' ) ); ?></abbr></span>
<?php edit_post_link( __( 'Edit', 'hbd-theme' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t" ) ?>
</div><!-- .entry-meta -->
<?php /* The entry content */ ?>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">»</span>', 'hbd-theme' ) ); ?>
<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'hbd-theme' ) . '&after=</div>') ?>
</div><!-- .entry-content -->
<?php /* Microformatted category and tag links along with a comments link */ ?>
<div class="entry-utility">
<span class="cat-links"><span class="entry-utility-prep entry-utility-prep-cat-links"><?php _e( 'Posted in ', 'hbd-theme' ); ?></span><?php echo get_the_category_list(', '); ?></span>
<span class="meta-sep"> | </span>
<?php the_tags( '<span class="tag-links"><span class="entry-utility-prep entry-utility-prep-tag-links">' . __('Tagged ', 'hbd-theme' ) . '</span>', ", ", "</span>\n\t\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>
<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'hbd-theme' ), __( '1 Comment', 'hbd-theme' ), __( '% Comments', 'hbd-theme' ) ) ?></span>
<?php edit_post_link( __( 'Edit', 'hbd-theme' ), "<span class=\"meta-sep\">|</span>\n\t\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t\n" ) ?>
</div><!-- #entry-utility -->
</div><!-- #post-<?php the_ID(); ?> -->
<?php /* Close up the post div and then end the loop with endwhile */ ?>
<?php endwhile; ?>
<?php /* Bottom post navigation */ ?>
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
<div id="nav-below" class="navigation">
<?php next_posts_link(__( '<span class="meta-nav">«</span> Older posts', 'hbd-theme' )) ?> <span style="color: #bbb;">•</span> <?php previous_posts_link(__( 'Newer posts <span class="meta-nav">»</span>', 'hbd-theme' )) ?>
</div><!-- #nav-below -->
<?php } ?>
</div><!-- #content -->
I have a feeling I am overwriting some query values, but I am finding contradicting information on various blogs. I have a feeling it has something to do with my $args array.
Am I supposed to concatenate that instead?
If so, where? $wp_query?
Thanks in advance for your help, and apologies for wordpress noob-ness.
I would add before your args
$paged = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1; // setup pagination
and then in your args
$args = array(
'posts_per_page' => 25,
'cat' => '-33',
'paged' => $paged
);
following by using this to show the pagination
'<div class="classForOld">'.get_next_posts_link('Older', $wp_query->max_num_pages).'</div>'; //Older Link using max_num_pages
'<div class="classForNew">'.get_previous_posts_link('Newer', $wp_query->max_num_pages).'</div>'; //Newer Link using max_num_pages
Thats all you need.

Resources