Results 1 to 4 of 4

Thread: Only display featured ads from current category

  1. #1
    Thread Starter
    Expired Customer icreatehosting's Avatar
    Join Date
    May 2015
    Location
    Johannesburg, South Africa
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Only display featured ads from current category

    Hello!

    I have added the featured ad slider at the top of my ad category listing. But it currently displays ads from ALL categories.

    I need it to display featured ads only from the current category.

    Would anyone perhaps know how to do this?

    I've edited featured.php to look like this:

    Code:
    <?php if ( $cp_options->enable_featured ) : ?>
    	<?php appthemes_before_loop( 'featured' ); ?>
    	<?php if ( $featured = cp_get_featured_slider_ads() ) : ?>
    
    		<div class="panel panel-warning featured-listings">
    			<div class="panel-body">
    				<h3><?php _e( 'Featured Listings', APP_TD ); ?></h3>
    				<ul id="responsive">
    					<?php while ( $featured->have_posts() ) : $featured->the_post(); ?>
    						<?php appthemes_before_post( 'featured' ); ?>
    						<?php get_template_part( 'content-slider', get_post_type() ); ?>
    						<?php appthemes_after_post( 'featured' ); ?>
    					<?php endwhile; ?>
    					<?php appthemes_after_endwhile( 'featured' ); ?>
    				</ul>
    			</div>
    		</div>
    
    	<?php endif; ?>
    	<?php appthemes_after_loop( 'featured' ); ?>
    	<?php wp_reset_postdata(); ?>
    <?php endif; // end feature ad slider check ?>
    [URL="https://www.icreatehosting.co.za"]Website Hosting, Domain Registration and Web Design South Africa[/URL]

  2. #2
    samcy's Avatar
    Join Date
    Mar 2012
    Location
    Germany
    Posts
    12,098
    Thanks
    121
    Thanked 1,756 Times in 1,442 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Rolf Hassel (Samcy)

  3. #3
    Thread Starter
    Expired Customer icreatehosting's Avatar
    Join Date
    May 2015
    Location
    Johannesburg, South Africa
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    [URL="https://www.icreatehosting.co.za"]Website Hosting, Domain Registration and Web Design South Africa[/URL]

  4. #4
    Veteran bleem's Avatar
    Join Date
    Feb 2012
    Posts
    1,572
    Thanks
    103
    Thanked 205 Times in 180 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Samcy How to display featured ad above category?
    By jake_r in forum Help Using ClassiPress
    Replies: 2
    Last Post: July 18th, 2014, 11:43 PM
  2. [SOLVED] Jobroller - How to create / display jobs in "Featured" category
    By ladler in forum Help Using JobRoller
    Replies: 3
    Last Post: January 25th, 2014, 10:23 AM
  3. Replies: 2
    Last Post: October 21st, 2013, 01:40 AM
  4. How to display current category name?
    By inexistentman in forum Report Vantage Bugs (Legacy)
    Replies: 1
    Last Post: June 10th, 2012, 08:02 PM
  5. Getting the Category to show the current in the searchbar dropdown.
    By lawrenceb in forum Report ClassiPress Bugs
    Replies: 3
    Last Post: March 8th, 2011, 09:48 AM