what file is required to be created in plugin folder in order to show all the post content of a CPT with the help of permalink

Your post type name is event so create a copy of your single.php then rename it as single-event.php and keep it together in the same folder with single.php. Now you can edit single-event.php file to or display whatever you have in your event posts. Again, copy and rename single.php file to single-event.php. it will serve … Read more

Looping through custom taxonomy in one template

As Template hierarchy says, there are 5 possible file names for displaying taxonomy: taxonomy-{taxonomy}-{term}.php – If the taxonomy is sometax, and taxonomy’s term is someterm, WordPress will look for taxonomy-sometax-someterm.php. In the case of post formats, the taxonomy is ‘post_format’ and the terms are ‘post-format-{format}. i.e. taxonomy-post_format-post-format-link.php for the link post format. taxonomy-{taxonomy}.php – If … Read more

Editor role isn’t seeing specific post type posts with only post_type parameter

What you need to do is to make custom user meta fields. Links these metafields to a custom category linked to your custom post type. Use this code for a checkbox feeling: <input type=”checkbox” id=”category-<?php echo $post_type->term_id ?>” <?php if($user_cats[0] && in_array( $post_type->term_id, $user_cats[0] )) echo ‘checked=checked’;?> name=”categories[]” value=”<?php echo $post_type->term_id;?>”/> Every custom category you … Read more

Creating Slider in wordpress theme with custom post

Perhaps in your post loop you would need to add a condition that checks for post type, using the get_post_type() function. So something like this: <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <?php if(get_post_type(get_the_ID()) === ‘your custom post type’) : ?> //Your slider code with current post data <?php endif; ?> <?php endwhile; … Read more