Retrieve a specific field from taxonomy term through advanced custom fields [closed]

To retrieve a field from ACF for a term (instead of, for example, a post), you should use the taxonomy name, followed by an underscore, followed by the term ID instead of the post ID when calling the_field or get_field. Assuming you want to retrieve the field image_toc for the taxonomy mytax and term ID … Read more

Need Help Finding a WordPress E-Commerce Plugin That Utilises Custom Post Types [closed]

You Should look at dukapress it a fairly new E-Commerce plugin but its loaded with features and it uses Custom post types. and as for the relation part, i had that same challenge as your are having in developing a site for one of my customers, i needed to relate a CPT (custom post type) … Read more

Disable revisions for a specific post type only?

Remove the revisions property inside the supports parameter of register_post_type(). Example $args = array( // … ‘supports’ => array(‘title’,’editor’,’thumbnail’,’comments’,’revisions’) ); register_post_type(‘book’,$args); Change to: $args = array( // … ‘supports’ => array(‘title’,’editor’,’thumbnail’,’comments’) ); register_post_type(‘book’,$args);

Create sub single pages

First, you need to register the custom post type so that it has hierarchy, i.e. a post can have a parent post. After that, you need to make sure your permalink structure is set to example.com/%postname%/. Once you have that, you only need to create a child custom post named sub-single-slug and set single-slug as … Read more

Get multiple custom type posts at once in edit.php?post_type request

I tried it out to get an idea of the problems you will run into. The following code allows you to specify multiple post types with the multi_post_type parameter: add_action( ‘pre_get_posts’, ‘wpse12970_pre_get_posts’ ); function wpse12970_pre_get_posts( &$wp_query ) { if ( is_admin() && array_key_exists( ‘multi_post_type’, $_GET ) ) { $wp_query->set( ‘post_type’, $_GET[‘multi_post_type’] ); add_filter( ‘the_posts’, ‘wpse12970_the_posts’, … Read more

Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)

This is a really interesting question, which can result in a very expensive, resource intensive process which can really slow your page down dramatically PRELUDE All my code in this question is based on the following post type and taxonomy, so before you run any code, make sure to adjust the post type and taxonomy … Read more

Adding Sticky functionality to Custom Post Type Archives

I think the answer to your questions lies on the following webpage. Its author (Tareq Hasan) faced the same problem as we do and found a solution. https://tareq.co/2013/01/sticky-posts-in-custom-post-type-archives/ Basically, you need to install the plugin you already have (Sticky Custom Post Types) and add a filter: (I paste the code here so if the page … Read more