Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug

Try changing the page’s slug to something else and changing your post type registration to this: $args = array( ‘labels’ => $labels, ‘public’ => true, ‘publicly_queryable’ => true, ‘has_archive’ => true, ‘show_ui’ => true, ‘rewrite’ => array(‘slug’ => ‘properties’, ‘with_front’ => false), ‘query_var’ => true, ‘capability_type’ => ‘post’, ‘hierarchical’ => false, ‘show_in_nav_menus’ => false, ‘menu_position’ … Read more

Reslug a Custom Post Type

I also created a similar approach as was mentioned by @sri, however using $wpdb vs wp_update_post should be more performant and configurable. /** * Reset the slugs on a particular post type to use the default sanatized slugs * @param string $post_type filter by post type * @param int $offset set the paginated post to … Read more

Setting a title on a Custom Post Type that doesn’t support titles

You could add a hidden input into the page to pre-set the title field, because it won’t be on the page(because the type doesn’t support titles). Slug is produced from the title, so you should only need add a title value. Something like this should work(though untested).. add_action( ‘submitpost_box’, ‘hidden_type_title’ ); function hidden_type_title() { global … Read more

Priority for Categories, Tags, Taxonomies, Posts, Pages and Custom Posts with same url

WordPress parses incoming URLs with a list of regular expressions, the rewrite rules. The first regex that matches the URL “wins”, and determines what kind of query will be executed. You can see the rewrite rules and play with different URLs with my Rewrite analyzer plugin. Whether or not pages take priority over other rules … Read more

How to remove certain words from url slug

There should be no problem with unset. There is your answer. What matters with a filter is what you return and unseting those keys before your rebuild the string and return it, works. You are doing too much processing by explodeing your $keys_false inside a loop, and you have a typo, and you are better … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)