Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
Checking Taxonomy Terms for a Custom Post Type With get_the_terms Not Working
user5477769 reports in the comments of the original post, that the problem has been solved: I was following Custom Post Type UI instructions but it seems it led me astray. Creating a archive-gallery.php with a vanilla Loop, along with removing is_main_query has solved all problems, and the pages now show with 9 posts and correct … Read more
Did you try creating a custom post type, and adding custom fields with Advanced Custom Fields? Advanced Custom Fields makes it easily to add custom fields to a post, and gives the possibility to hide other elements, like the content editor and featured image. In my opinion, you should create a custom post type, and … Read more
You need to pass the category name as well if you want to show posts from specific category.. You just need to add one more param to the get_posts array. REPLACE THIS <? $products = get_posts( array(‘post_type’ => ‘products’, ‘posts_per_page’ => 400,) ); ?> WIth THIS <? $products = get_posts( array(‘post_type’ => ‘products’, ‘category_name’ => … Read more
Am Afraid that you have to go with Direct MYSQL or you can run two WP_Query() and then combine them, sort them or sort them with WP_Query() then combine them. Here is an example $args = array( ‘post_type’ => array( ‘staff-updates’, ‘coreteam’, ‘developing-updates’, ‘vacancies’, ‘recognition’, ‘page’ ), ‘orderby’ => ‘modified’, ‘posts_per_page’ => ’10’, ‘order’ => … Read more
Execute code only after user clicks ‘update’ button for CPT being edited
PHP handles all content inside single quotes as string therefore your code does not work as expected. You should remove quotes from $today in meta_query and from true in suppress_filters
With a combination of jQuery / JavaScript and WP AJAX; you could look for an onchange event on the select box, send an ajax request to your admin-ajax.php with the year and then do a custom WP Query to return the html for the secondary drop down and append it to your dom. https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_%28action%29 http://api.jquery.com/jquery.ajax … Read more
How to load custom post type plugin after acf options page (or get settings from there another way)?
Yes, any of those are possible and configurable under Settings > Permalinks. Have a look at the Permalinks page for other possibilities. /%category%/%postname% Hope this will help you.