After i posted the question, i was told the staging site which i was working on, and the production site’s code was out of sync.
The answer ended up being simple:
'posts_per_page' => 8,
(which was actually working but was out of sync with repos / server)
was actually set to 'posts_per_page' => -1
, which i changed to 'posts_per_page' => 6,
and that did it!
And for pulling the most recent, i didn’t realize it does by default, which i found that answer here.
Related Posts:
- the_date() not working
- Delete post revisions on post publish
- How to sort results from a custom database table
- WP database error for comments_popup_link()
- Why is variable not working on custom sql query using wpdb?
- Create WP_Query to search for posts by their categories or their parent/child categories
- mysql query from wordpress page using custom table
- Long running queries
- Using $wpdb (WPDB class) ‘replace’ with multiple WHERE criteria problem
- WordPress SQL injection
- mySQL queries are executed twice on wordpress website
- WordPress Custom Query: Combining Two Functions
- SQL error with custom query
- Query doesn’t display text data with apostrophes
- How to do a MySql query in WordPress?
- How can I display a query in a page?
- Include a custom field in mysql query
- Query Concatenation
- wp query foreach deleting record returning only first or last item
- Refresh table data with Ajax
- Two queries for a WP_User_Query search work perfectly apart, but not together
- Trying to get a PHP variable defined in a custom post into a javascript file. Null value. Using wp_localize_script
- database sent to a JSON file
- Limit 1 global comment per minute
- inserting a post from an extern php file but post content doesn’t show on wp site
- Query if audio attachment AND/OR custom field
- Database query works fine outside WordPress
- $wpdb->wp_users returning empty value for
- Large Woocommerce Site (83,000 items), What Can I Do? [closed]
- $wpdb->insert() does not Insert record in a table
- Using custom tables for old posts
- register_taxonomy() take much queries
- Help with a $wpdb MySQL Query
- Not connecting to database in file with multiple MySQL connections
- Which is the correct way to conditionally enqueue a CSS file?
- Way to bulk make all my tags lowercase?
- $Wpdb post meta query is not working with mutliple meta keys and values? [closed]
- How i can obtain all the post meta for a specific post as an array?
- multiple where condition in result query
- Odd / Even posts add class minus first post
- Grouping posts by a custom meta value
- unable to use ‘new WP_Query’ in AJAX call
- Multiple meta_key in one global $wpdb;
- Custom array from a query only write the last row of the query
- WordPress member notification
- Parse error: syntax error, unexpected ‘}’ on get_the_author_meta [closed]
- Can’t Query Custom Table Using $wpdb Method
- Defined WordPress Memory Limit to Unlimited
- Moving wordpress site from localhost to live server using GoDaddy cPanel
- How does WP work in conjunction with a web server?
- WordPress Block developer from exporting Database via PHP
- How to list commenters and days since last commented
- How to add div blocks after certain set of post
- $wpdb returns duplicate posts
- How to overwrite orderby with add_query_var
- Can’t update multiple rows with $wpdb query
- Update postmeta after theme switch
- How to solve Woocommerce Memory Limit
- Mixing variables into an array when inserting values
- Location of core code for database connection and get_header
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- php include not working in custom page
- How do I display offsite database info on my wordpress site?
- Creating Database Table vs. Adding MetaData to Post & User
- Make a database query using WordPress
- Force Users To Relogin
- working with term_relationships table
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- WordPress Custom SQL Table with UserID Filter for results
- WordPress query undefined offset in loop
- Most commented posts by time period (last 12h, last 24h and etc)
- WordPress hit memory limit but not from the server
- Can I make get_users() query global?
- Use $wpdb or other PHP script method to find/replace in WP database
- email alert for product availability
- How can I add a new row in a separate database when someone registers via WordPress?
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Issue with custom loop in Archive page
- How to display SQL query that ran in WC_Order_Query?
- Basic wpdb update question
- Custom Post type slider with thumbnail navigation
- Hide posts if user is added to it WP_query
- I can’t update my data through $wpdb
- A $_POST should occur when submit form but is not?
- Parse error: syntax error, unexpected ‘}’ [closed]
- Custom route and query
- Output: “Array”
- Shortcode to pull posts
- How to unserialize data from MySQL
- How to use mysql LIKE with wpdb?
- PHP -> SQL Query with Summing
- How to hide posts of a specific custom category in WordPress?
- Pull MySQL data from multiple tables and merge into 1 PHP array
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- WordPress WP_Query without query GET parameters
- How do I prepare strings for insertions as values into a MySQL table?
- Known Issues in WordPress When Upgrading PHP to ver 7
- Using CFDB7 vs Custom MySQL Database [closed]
- Why is my max_upload_filesize being limited to 2M? [duplicate]