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 8493203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:56:26+00:00 2026-06-10T22:56:26+00:00

I have setup a custom taxonomy called video_categories and have set it to two

  • 0

I have setup a custom taxonomy called “video_categories” and have set it to two different custom post types – “videos” and “locations”.

I am using the template “taxonomy-video_categories.php” to display the posts that have related taxonomys but I would only like to display the post type “videos” and exclude the post type “locations”.

  • 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-10T22:56:27+00:00Added an answer on June 10, 2026 at 10:56 pm

    You can simply use query_posts to alter the main loop.

    Put the following code before have_posts call :

    global $query_string;
    query_posts( $query_string . '&post_type=video' );
    

    A proper way for doing this is to hook into pre_get_posts :

    query_posts() is the easiest, but not preferred or most efficient, way
    to alter the default query that WordPress uses to display posts. Use
    query_posts() to display different posts than those that would
    normally show up at a specific URL. (The preferred way is hooking into
    ‘pre_get_posts’ and altering the main query that way using
    is_main_query)

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

Sidebar

Related Questions

I have a custom taxonomy setup called albums, and a new album can be
Is it possible to have nested set capabilities in this somewhat custom setup? Consider
I have setup a custom Post Type in WordPress and have a question. How
I have setup a custom post type in Wordpress. It is a section where
I have a custom post type in which I have custom taxonomies setup. I
I have setup Custom Domain https://developers.google.com/appengine/docs/domain I have uploaded An SSL certificate and private
I'm trying to setup custom validation for a checkbox. I have 7 checkboxes each
I have visual studio setup project with a custom RadioButtons dialog. How do I
I have the following setup: Web.config has customErrors mode=Off Global.Application_Error() event calls a custom
Here's the setup. I have a custom UIScrollView as a subview of PrimeView. The

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.