programmatically generated custom post type is created more than once
programmatically generated custom post type is created more than once
programmatically generated custom post type is created more than once
Sudden 404 pages on product category archives
I solved this by creating a custom post type “conversation” with several post meta Post meta: number of messages Post meta: message_1 Post meta: message_1_author Post meta: message_1_timeline When displaying a conversation I check against “number of messages” for (i=1; i<=nr_messages; i++){ show_message(i);
Get all posts by many custom post types
Every archive is a posts archive, the main post archive being the homepage, if you want to move posts to a different URL, you can go to the readins settings and declare a page to be the posts page. Note that this page then acts as a placeholder purely for slug/URL purposes. You can’t change … Read more
Multiple Loops In Tabs Only Displaying First Loop
How to get custom post type with dynamic ID
You just need to put a query in your template. As an example, I use less conditions. You may add what is necessary later. // prepare arguments $args = array( ‘post_type’ => ‘members’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘post_status’ => ‘publish’, ); // create a query based on arguments $query = new WP_Query($args); while … Read more
This was caused by two ACF field groups having the same field slug. Took some digging.
If you would like to add taxonomy other than default, you need to create another one by using register_taxonomy() Because by default, only category and post_tag are created and associated to post. Add the following code in functions.php // ‘post’ is the post type name that you want to associate this new taxonomy to. function … Read more