If you’re familiar with ZF you might be looking for models and layouts, both which you need to manually code with WordPress.
But if you do so, you’ve got full possibilities.
So feel free to create multiple template files and load them when it’s needed (e.g by hooking into template redirect or get_template_part) and then just query what you feel you need for (with WPDB you can fire up any SQL query you need the blog’s MySQL server credentials for).
Related Posts:
- query posts in wordpress
- 2 loops, is_home won’t work, count is off
- posts_nav_link(); not showing up on static pages
- Get list of months with posts
- Why is the first query affecting the second query, even after wp_reset_query() and wp_reset_postdata(), but not on the second page?
- Custom URL parameters in template files
- Metadata Query when storing data as array possible?
- show a post from a specific post format
- Using $post->post_name in body id causing error: Trying to get property of non-object
- Keep sticky posts out of query unless they have featured image
- How to query the latest 5 posts and sort them by title?
- Reset WordPress Post Query to default
- Show specific category posts on Genesis framework home page
- How can I prevent posts with no title showing up in my query?
- How can I use the WordPress Loop and Pagination in multiple instances but different scenarios throughout my site?
- CSS class on last post in loop ( custom query )
- Custom Post Type Query issue
- How to order by multiple date meta_values?
- WP_Query not getting all posts, just tagged posts
- tag__in does not return posts
- Read more doesnt work with query posts
- View list of all attachments on site
- multiple queries to get posts from same category?
- Allow filtering of loops for all categories
- Best practice for implementing a blog page / section in wp_menu_nav()
- Getting post URL within custom content template
- Custom Static Page to Display Blog Posts in Excerpt Non-Singular Form (is_singular not working?)
- Not the typical order by posts by date question
- Paginated WP_Query doesn’t return 404’s, even when posts don’t exist
- issue displaying variations in custom template using WPeC 3.8.9.2
- Exclude first post from wp query
- How do I access the current post object within a block theme template or pattern?
- Adding a div to wrap widget content after the widget title
- How to put custom post types on front page
- How to edit bbPress template files – WordPress + BuddyPress + bbPress? [closed]
- Query posts distinct authors
- Adding Content Areas to Custom Page Template
- Add class to before_widget for all widgets with a dropdown and a counter
- What is the best practice for customizing a plugin’s JavaScript/jQuery?
- Override default cropping in WordPress [duplicate]
- Trouble with conditional tags
- How to use Iris color picker on front-end?
- First post of each category
- create blocks programmtically on theme activation
- Possible to add “Template” selector to posts?
- Set front page as static page [closed]
- Adding LazyLoad and InfiniteScroll to WordPress Theme
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Adding default pagination to wordpress loop
- If I build a custom theme, will it update?
- Implement content-nosidebar.php / content-leftsidebar.php
- How to change i18n/l10n of #reply-title? (Old title: Comment reply link not working)
- What are the Entry classes for?
- Using an if statement in the theme customizer page
- Installing WordPress locally
- Custom markup with wp_nav_menu based on pages
- How to edit my theme for full width?
- What VSCode extensions are there for working with block themes? [closed]
- What is the “correct” way to add hooks or similar PHP behavior to a blocktheme?
- Fetch wordpress video attachment with post ID
- Echo all category names, apart from one
- Custom Blocks as part of a theme
- How to set up diffrent mobile theme for single site in WordPress?
- Query all posts if multiple meta key don’t exist
- Enqueued JavaScript is not working
- Derive child theme from separate theme
- How to change footer or for different kinds of users in wordpress?
- How to Download Minimum Requirement of WordPress (Not Themes )
- Create a child theme from multiple themes
- How to code custom special page
- Displaying the right content on a page url
- wp_query with ajax
- Is it possible to set a variable for get_post_meta?
- Custom admin logo not showing after wordpress 4.5 upgrade
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Translate a child theme with pure PHP and gettext
- Only the latest post shows up on post page?
- WordPress pulling in random page themes
- Trouble in enquing all js files under certain directory
- Show single posts date, in a page of posts
- Can’t change theme name
- Stop WordPress from showing images on non post pages
- enqueuing external and internal js and css in wordpress did not work with owl.js animate.css
- Next and previous post link shows error in first and last post
- use a single nonce in three different nonce field
- Theme is Enqueueing Everything in Footer
- How to search CPTs in draft using get_page_by_title()
- Local theme changes upload on server but theme changes not showing
- Media & Plugin screens stall
- wp_kses allow checkbox class and checked
- Is wp_mail plugin territory?
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- How do I remove p tag *insertions*? Disabling `wpautop` removes manual tags
- Create a variable with string, array or multiple values
- query post based on comparison
- What hook to use for loading a custom class extension during Theme initialization?
- Use external fonts in WordPress stylesheet
- Custom link color or stylesheets
- What is the advantage of using home.php over index.php for the front page
- When to use WP_query(), query_posts() and pre_get_posts