I was seeing nothing in between the header&footer because I did not actually display the posts in my custom query, which can be done using template tags like the_title()
and the_content()
. More details here:
https://developer.wordpress.org/themes/basics/the-loop/
But then I found out that I could simply use the cat
parameter in the URL to view posts in certain categories, e.g. https://example.com?cat=1,5,9
to view posts in the categories 1, 5 and 9.
So it was then easy to just stick the query URL in a menu item’s custom link, and I no longer needed to use the custom template.
Related Posts:
- Listing Category ‘child_of’ by slug rather than ID
- Alphabetizing Posts in a Category Page?
- How to override Category rendering mechanism
- Why is this category page limiting the number of posts?
- Listing Parent, Child and GrandChild Categories and then the PostTitles on Page Template !
- Custom page for WooCommerce’s /product-category/
- Making a tourism information website [closed]
- display posts from specific category on a page , in thematic child theme?
- Page display certain Category Posts
- Add a custom category page in WordPress.org
- List all posts in a category with query_post() function
- Problem with different query loops (and “main loop”) on category template page!
- Home Page Template – Specific Category
- Template for product-category page [closed]
- Custom Page Template Category loop not functioning correctly
- How to differentiate the homepage structure from the category page structure in WordPress template?
- Assigning certain pages or posts to use the template of the parent page or category
- Detect category choice for posts with multiple categories
- Add custom categories and subcategories and posts as custom pages
- How to edit woocommerce sub-category page
- Show alternative menu based on page template AND post category
- Own Custom Tags/Category page ( posts)
- Paginate WordPress Category Pages
- Dynamically Adding Category Specific Content To Specific Category & Subcategory Pages
- What defines a post as portfolio page content?
- Hook when category is added to post
- get_categories for custom post type with a specific custom taxonomy attached
- Exclude categories from Loop, queries, widgets, post navigation
- how to use a different domain/subdomain for authors/catagories on single site?
- WordPress 1 domain multiple blogs
- Category count inside the link
- Is there a way to have duplicate category slugs?
- One WordPress Install, Two Categories. Each Category Gets a Domain
- Name of last category level for a post
- How to add style to category link?
- WordPress Ordering Problem. How to fix ordering 1-10-100 issue?
- Filtering Children of the “uncategorized” Category out of the Loop?
- how to show posts of category random by session
- Remove “Parent” Selection When Adding/Editing Categories?
- Filtering search results
- WooCommerce change category url and product base
- How can we get Catergory / Term Creator
- Seperate WordPress catagories into sepeat list on seperate pages
- Redirect category to first available child post
- Show post only if match all categories
- How do you bulk remove a category from posts?
- How to get product count with respect to categories in WooComerce
- Display WordPress Parent Categories Only?
- Additional featured post on first page
- Assign automatically and manually modify category
- Displaying a full post instead of a slug per category?
- previous/next_post_link in the same sub-category?
- How do I toggle pagination on/off in search results and category listings via a link?
- get_categories() returns “Uncategorised”
- How to show WordPress parent and child category using a different template?
- How can I get categories IDs if multiple categories requested via URI?
- List categories with custom code
- How do you create a custom template to display a category with an image and related posts below?
- WordPress for Podcast Network
- Categories widget show empty?
- How do I display something on a particular category page?
- Exclude a category from a query that includes its parent category
- Count the posts number for every category
- Change of category structure will cause two kinds of URLs for one post
- Portfolio Filter Buttons Wont Work
- set terms to category and subcategory
- Woocommerce filter function not updating
- Get Meta Keys of Custom Categories
- Change slug of Standard wp Post category
- Hide a category of posts from main blog, and only show in category view
- ACF no print data [closed]
- Get the name of category in query
- Archive filtering
- Split multiple categories into two columns
- WooCommerce shared categories
- Assignt automatically two categories by author
- pagination 404 error, same slug home and categories
- WordPress 5.4 and higher: Filter posts by category 1 AND category 2 in API requests
- How can I order all subcategories alphabetical independent of the parent categories?
- Add Catgory (assign) to Post Programmatically (without editing)
- Linking to the most recent post in my podcast category
- How to select a parent category and show the children to choose in another select?
- How can I display categories on different pages
- How to add excerpt and read more button to category archive page
- Icon images across multiple categories
- custom browse by
- Use different file includes for single.php
- How to get related category/categories in WordPress archive page
- Adding a button to a product if it’s in a category, then linking to that category
- Conditions for single post
- Pages with posts filtered by category
- how to get number of posts in a category on a specific date
- How to add all categories into an array and extract the categories names and use it with a custom meta box
- Using pagination with multiple loops causes it to break
- Query posts that have all the specified tags
- How can I show page per category in wordpress? (Yes, category by page!)
- Why does my category page display “posted on…” when all I want it to do is display categories?
- Remove category number fill
- Post list category plugin alphabetical order [closed]
- Fetch all categories from database