Results 1 to 2 of 2

Thread: How do I ignore sticky posts for search results?

  1. #1
    Thread Starter
    Expired Customer rinserepeat's Avatar
    Join Date
    Jun 2015
    Posts
    10
    Thanks
    0
    Thanked 1 Time in 1 Post

    How do I ignore sticky posts for search results?

    How can I ignore sticky posts for search results? I dont want listings that dont meet certain criteria showing up in results. Sticky posts are still showing even when they are outside the price range Ive specified in search. I realize I need to make a second loop file ie loop-ad_listing2.php. What do I need to day to this code? I've tried a few different things to no avail. Thanks in advance for your help.

    PHP Code:
    <?php
    /**
     * Main loop for displaying ads.
     *
     * @package ClassiPress\Templates
     * @author  AppThemes
     * @since   ClassiPress 3.0
     */
    ?> 

    <?php appthemes_before_loop(); ?>

    <?php if ( have_posts() ) : ?>

        <?php while ( have_posts() ) : the_post(); ?>

            <?php appthemes_before_post(); ?>

            <?php get_template_part'content''ad_listing' ); ?>

            <?php appthemes_after_post(); ?>

        <?php endwhile; ?>

        <?php appthemes_after_endwhile(); ?>

    <?php else: ?>

        <?php appthemes_loop_else(); ?>

    <?php endif; ?>

    <?php appthemes_after_loop(); ?>

    <?php wp_reset_query(); ?>

  2. #2
    Thread Starter
    Expired Customer rinserepeat's Avatar
    Join Date
    Jun 2015
    Posts
    10
    Thanks
    0
    Thanked 1 Time in 1 Post
    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. Replies: 5
    Last Post: April 26th, 2015, 02:01 PM
  2. Change the number of posts on category, search results, and popular ads
    By dragosdaniel in forum ClassiPress General Discussion
    Replies: 1
    Last Post: March 11th, 2013, 12:34 PM
  3. Samcy Recent Posts screws up on search results page
    By arthurganem in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: January 23rd, 2013, 01:27 AM
  4. Make featured ads (sitcky posts) first (top) results in search
    By fedeogue in forum Report ClassiPress Bugs
    Replies: 7
    Last Post: June 12th, 2012, 11:08 AM
  5. Replies: 7
    Last Post: November 9th, 2011, 08:48 AM