orderby rand is not working for a custom post types
Add order asc $args = array( ‘post_type’ => ‘nd_rst_cpt_1’, //custom post type name ‘orderby’ => ‘rand’, //random order ‘order’ => ‘ASC’, ‘posts_per_page’ => 1, //shows only single post );
Add order asc $args = array( ‘post_type’ => ‘nd_rst_cpt_1’, //custom post type name ‘orderby’ => ‘rand’, //random order ‘order’ => ‘ASC’, ‘posts_per_page’ => 1, //shows only single post );
Visual editor issue by having multiple tiny mce editors in a CPT
Allow post/page hierarchy across different post types?
Not sure the rewrite rule is good, but to answer the question about getting the post meta – you already have the post Object, so you don’t need to run a function to get the global $post, which might also fail or be wrong – you can simply use: $metaText = get_post_meta( $post->ID, ‘test_text_field’, true); … Read more
I was able to put this together from a similar question I found. If anyone else needs it: <?php $terms = get_terms( array( ‘taxonomy’ => ‘features’, ‘hide_empty’ => false ) ); if (!empty($terms) && ! is_wp_error( $terms )) { echo ‘<section>’; foreach ($terms as $term) { $class = has_term( $term->term_id, ‘features’ ) ? ‘active’ : … Read more
As I understood you want to be able to add Students from the Teachers post type and assign them directly to the current teacher. Is it impossible? I don’t think so but definitely not an easy task to pull off. You are going to have to manually write all the code the outputs a form … Read more
Need Output Custom Taxonomy from Custom Post Type
ACF Field on CPT Slug
How to make your AJAX filter works properly: As I said in the comments, add the data-category attribute to the <a> having the CSS class js-filter-item in the foreach loop in your archive-projetos.php template: // * Wrapped for brevity. foreach ( $categories as $cat ) : ?> <li><a class=”js-filter-item” href=”<?= get_category_link( $cat->term_id ); ?>” data-category=”<?= … Read more
How to use load more custom post type data normal or according to on click category tab In WP