• I want to filter the recent posts that appear on my homepage by category, i.e. only posts with category ‘showcase’ will appear on the homepage.

    I found some tips as how to edit the code, but I am using the Photo template from wpexplorer, which renders the homepage like this (quite differently from the loop code I came across in related questions):

    <article <?php post_class('single-entry clearfix'); ?>>
    	<?php
    	// Test if post has a featured image
    	if( has_post_thumbnail() ) {
    		// Get resize and show featured image : refer to functions/img_defaults.php for default values
        	$wpex_entry_img = aq_resize( wp_get_attachment_url( get_post_thumbnail_id(), 'full' ),  wpex_img( 'blog_entry_width' ), wpex_img( 'blog_entry_height' ), wpex_img( 'blog_entry_crop' ) );
    	?>
            <div class="single-entry-thumbnail">
                <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php echo $wpex_entry_img; ?>" alt="<?php echo the_title(); ?>" /></a>
            </div><!-- /single-entry-thumbnail -->
        <?php } ?>
        <div class="entry-text clearfix">
            <header>
                <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
            </header>
        </div><!-- /entry-text -->
    </article><!-- /single-entry -->

    Anyone? It would be of great help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • As your chosen theme is behind a Twitter-wall, you will need to contact the theme’s developer for support.

    Thread Starter Wanderlvst

    (@wanderlvst)

    Behind a Twitter-wall?

    You cannot download a copy of any of the themes without tweeting about it first.

    Thread Starter Wanderlvst

    (@wanderlvst)

    The only requirement to download this theme is to register for free. Anyway, I do not see the relevance to the solving of my question?

    The wordpress.org support forums are meant for the core application, themes and plugins that are distributed on wordpress.org.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Filter recent posts by category’ is closed to new replies.