Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8024697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:56:08+00:00 2026-06-04T22:56:08+00:00

I am working on classipress (a wordpress theme) and I am intend to make

  • 0

I am working on “classipress” (a wordpress theme) and I am intend to make that feature (sticky post) come up on the top of the category.

Thus far I have obtained the result needed by using the below script, so for this classipress have two files which deals with category ad lisitng:

  1. taxonomy-ad_cat.php
  2. loop-ad_listing

taxonomy-ad_cat.php actually passes the current category & calls the loop-ad_listing of that category so I initially call only the sticky post and then call post except of sticky by using below code:

query_posts( array('post_type' => APP_POST_TYPE, APP_TAX_CAT => $term->slug, 'ignore_sticky_posts' => 1, 'paged' => $paged, 'post__in' => get_option('sticky_posts')) );
loop hoes here...

The problem is that I want to check within loop-ad_listing.php that the post__in is sticky or not , because when (as an example) a category currently doesn’t have the listing and it shows the empty message twice. Once for the sticky calling loop & a second for absence of sticky calling loop..

Can you help me implement this correctly in to my posted code based on my description?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:56:09+00:00Added an answer on June 4, 2026 at 10:56 pm

    Coool…I got the the solution…

    i made another file which is *loop-ad_listing1.php* & in that file i only check if dont have the post show empty message & in the original file which call for the loop whcih is *loop-ad_listing.php* … i remove empty message from it…

    So what i achieve is,

    if i have the ad listings on that page my alternative file show nothing & orignal file shows listing & if dont have ad lisitngs than my duplicate file shows empty message while original file donot show any thing.. cool:)

    While the above mentioned Mihai Stancu trick will also work & preferable if we have only one file for listings.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

working on a highly complex WordPress theme that features many different custom post types
working on xcode I realized that if I create a non-void method, I call
Working on an extension that use the new experimental devtools apis. How do you
Working with a Lucene index, I have a standard document format that looks something
Working with SSRS and a SQL 2000 source, I have a stored procedure that
Working against jQuery 1.3.2 I'm looking for best practices that implement the typical '
working on my paypal integration and its going great - I was wondering that
Working through Pro ASP.NET MVC book and I got the following code snippet that
Working on three different computers at two different locations, on projects that are in
Working with an API that can handle multiple connections (i.e. sessions), each of these

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.