the title not working from a custom post type

you need the WP_Query Before your Code: <?php $allCat = array( ‘posts_per_page’ => 3, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category-products’, ‘field’ => ‘slug’, ‘terms’ => ‘your-slug’, ) ) ); ?> <?php $all_product = new WP_Query($allCat); ?> <?php if($all_product -> have_posts()) : ?> <?php while($all_product -> have_posts()) : $all_product -> the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/163683/<?php the_permalink(); … Read more

Custom Post Type Pagination Problem in Admin Section

It turns out that in my functions.php file, I had the following function: function limit_posts_per_archive_page() { if ( is_tax(‘project_categories’) ) $limit = 9999; else $limit = get_option(‘posts_per_page’); set_query_var(‘posts_per_archive_page’, $limit); } add_filter(‘pre_get_posts’, ‘limit_posts_per_archive_page’); This was an old function modifying the pagination on the front-end, and it turns out that this was causing the error. Removing the … Read more

Remove the “View” Link in Post edit Admin

(1) The Edit Permalink HTML including the View-Post button is passed through the get_sample_permalink_html filter. You will likely have to preg_replace() the view post button out of it: function my_get_sample_permalink_html($a){ return preg_replace(“/<span id=’view-post-btn’>(.*)<\/span>/”,”,$a); } add_filter(‘get_sample_permalink_html’,’my_get_sample_permalink_html’); (2) The message after a post has been updated can be altered by filtering post_updated_messages. Like this: function my_post_updated_messages( $messages … Read more

List all posts from custom post type by taxonomy

You could try this way. Create a new page called say ‘All products’ and apply the following template to it. Here is the code for that should be used in your template, just above the while loop. $type=”products”; $args=array( ‘post_type’ => $type, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘caller_get_posts’=> 1 query_posts($args); A complete sample template … Read more