Filter recent posts by category (6 posts)

  1. Wanderlvst
    Posted 3 years ago #

    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'); ?>>
    	// 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">
                <h3><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
        </div><!-- /entry-text -->
    </article><!-- /single-entry -->

    Anyone? It would be of great help.

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    As your chosen theme is behind a Twitter-wall, you will need to contact the theme's developer for support.

  3. Wanderlvst
    Posted 3 years ago #

    Behind a Twitter-wall?

  4. esmi
    Forum Moderator
    Posted 3 years ago #

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

  5. Wanderlvst
    Posted 3 years ago #

    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?

  6. esmi
    Forum Moderator
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic