This explicit code is missing from your example and you should verify that you have at least these statements (plus any additional post tag functions, or analogous calls to “the_content()”) included exactly as this in your original code:
while ( $the_query->have_posts() ) : $the_query->the_post();
the_content();
endwhile;
This should roughly be at the location noted by this comment in your code:
// The Loop
If your while statement is not specifically calling methods of $the_query, that would call up a default query that has already been run and that does not match your category query.
Related Posts:
- Pass media upload value to input field
- Retrieve POST data from AJAX call
- JqueryUi Dialog giving Uncaught TypeError: this._addClass is not a function error
- Detect a focus on wp_editor
- WordPress Ajax always returns a 404 error
- problem with ajax and the path to the php page
- How to use wp_localize_script in a WordPress page other than functions.php?
- Real time Duplicate title check
- Is there a reason why my wordpress PHP page isn’t loading into my PHP template
- How to stop loading multiple copies of jquery
- Update WordPress Custom Field with AJAX on cached page
- Targeting single page with JS
- JS completely stopped loading but Files are found
- Click loads template via ajax
- How to retrieve the content (with a specific ID) via ajax by clicking a link tag
- Loading jQuery in the footer after removing jQuery migrate?
- Returning a value from a PHP page
- Stumped – Ajax Response Returns 0
- Sending jsPDF documents to the server
- wp_insert_post() is returning the correct post ID, no failure, but the post content does not get updated
- js file in root loading without
- WooCommerce – Reset quantity input field when variation changes
- Checking for new message using AJAX and PHP. Server overload?
- jQuery not defined
- AJAX request status 200 but no actual “response”
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- How to design a table based on css values set from admin/dashboard
- Pass Category Name, Description and Photo into variables to pass to jQuery
- Adding Custom Slider
- Save Search System
- populate form fields in a loop with ajax
- dynamic dependent select dropdown
- Change “add to cart” button color based on Woocommerce product category [closed]
- Ajax request returns ‘Array’. How to output the actual results?
- Ajax load more button for comments wordpress
- Slick + PHP + ACF + JQuery slide reveal not working
- Gravity form built in Captcha
- Show success or error messages in Ajax response to WordPress custom registration form
- How to add a Custom Mailchimp AJAX Newsletter Subscribe Form
- Plugins not working on AJAX requests
- Fancybox type popup window that’s not an iframe
- Can I use a jQuery Ajax request in Code Snippets Plugin for WordPress?
- JQuery calling a Custom PHP function (Works in Dev but not in WordPress)
- Jquery function working in Dev Console but not otherwise [duplicate]
- Form Security: nonce vs. jQuery
- How do I Import / Upload Files with jQuery AJAX?
- Why does wp_head hook my functions to the beginning of my source code?
- Automatically set all tags to have a height of 0 if there is no content inside the tag [closed]
- What are the advantages/disadvantages of using jQuery DOM manipulation as opposed to PHP DOM manipulation?
- Is it save to use eval for a jQuery callback method coming from the database?
- Function won’t run onclick using Ajax
- WordPress plugin admin page – using WordPress function in linked php file
- A $_POST should occur when submit form but is not?
- jQuery Ajax PHP function call returning [object Object]
- How to use the wpsnonce clone post link?
- Shortcode to pull posts
- How to add post thumbnail dynamically using Jquery?
- calling function in external js file
- How to refresh a page from jquery [closed]
- Cloning add_settings_field() with jQuery
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Execute PHP code only with specific user role
- How to set value selected using select2 jquery plugin
- Tracking Visitor LatLng with WordPress using JS, PHP. How to put data which was extract using JS into DB
- WordPress – Query specific category and automatically change category each month
- Admin-ajax.php 404 error
- How to pass values from one function to the other using an array variable
- How to change PHP variables with AJAX request in WordPress
- How to pass bloginfo(url) in a jquery
- WordPress ajax filter returning all posts when it should be filtering by category
- Input field duplicates on form submit by jQuery
- How to echo a PHP code into WooCommerce variation product?
- include javascript Multiple files in wordpress through script.js
- Let user select the number of posts shown per page jquery error
- ACF + WP + Slick Slider Repeater Slide Group PHP not Displaying [closed]
- Find the method which AJAX GET calls
- AJAX Filter WHILE Loop not working WordPress
- Default Image not showing up in Customizer for WP_Customize_Cropped_Image_Control
- How to create a radio button to alt between settings in wp_options table
- WordPress AJAX load post metadata in modal
- Form not working as it should in WordPress, but in a normal HTML site it does
- Why I’m Not Having Access to “$_POST” Data Outside My AJAX Callback?
- Add a downloaded JS file to WordPress
- How to call javascript function (jquery) in a shortcode?
- How to run ajax in WordPress Post?
- How can I correctly POST to a WordPress page?
- Adding instant search to wordpress page
- Add php function into .js file (for tinyMCE button)
- I am trying to call external database recieving error
- reorder a WP_Query, using a dropdown
- Edit Image/Image Details – Replace button missing
- Use ajax response in PHP function
- JSON Object Value Show Undefine
- Adding jquery using php function
- How to hide .js files on wordpress website using php or wp plugins or any? [closed]
- Different behaviour between “include_once” and directly echoing out html code?
- notify users when changed database
- How to use js variable to php in wordpress functions.php
- Upload multiple files via ajax from an HTML file input
- get_post_meta returns on side but it doesn’t return on bottom of admin page