Dynamically count the number of custom post types associated to a custom taxonomy
You have to get them with WP_Query. Creat an array then get the number of posts from found_posts function.
You have to get them with WP_Query. Creat an array then get the number of posts from found_posts function.
How do I get parameters from the URL?
Extend search query to search meta keys values based on search string
Pagination only showed when no category is set in wp_query
This isn’t possible because your search term would not appear anywhere. You can search for the entire search term, but you can’t search for one part in the title/content and another part in the meta/fields, not without separate fields and separate values. The only way this would work is if the title had the year … Read more
How to sort search result by post_title, then by post_content
Simple Apex Charts with jQuery not working
Query order by a numeric ACF field
It appears that you’re attempting to add a function to the init action hook from within the function you’re trying to add. Your code is doing this: function portalp_custom_taxonomies() { // … add_action( ‘init’, ‘portalp_custom_taxonomies’ ); // … } …when it needs to do this: function portalp_custom_taxonomies() { // … } add_action( ‘init’, ‘portalp_custom_taxonomies’ ); … Read more
I’m trying to get posts under a custom taxonomy but I don’t know what I’m doing wrong here