Hide category name using mod_rewrite

I solved my problem. All I needed was the WordPress Rewrite API. if( ! function_exists(‘theme_add_rewrite_rules’) ){ function theme_add_rewrite_rules(){ add_rewrite_rule( ‘^blog/([^/]+)/?$’, ‘index.php?name=$matches[1]’, ‘top’ ); } } add_action( ‘init’, ‘theme_add_rewrite_rules’); This solves how wordpress will parse the URL. Half of the problem is how to modify the posts so that the links will not include the /en/ … Read more

How to create URL for Pages/Posts

To get URL like www.example.com/lp/time-cost/free-trial you need to create parent child pages. Create lp as parent page Create time-cost as child page of above (lp page) Create free-trial as child page of (time-cost) page Then if you access free-trial page you will get the URL like you want.

How to auto update post title and slug with category name when post status is updated

You need post status transitions, and quite similar with this post: Detect type of post status transition only what you need to do update post title and slug, and this is easy. Update post examples Since you wrote like this: add_filter( ‘the_title’, ‘my_modify_title’, 10, 2 ); function my_modify_title( $title, $id ) { if( in_category( ‘My … Read more

Getting a 404 on single custom post type page when using rewrite on a custom taxonomy

Add priority with at least 1 to your add actions: add_action( ‘init’, ‘add_training_post_type’, 1 ); add_action( ‘init’, ‘create_training_taxonomies’, 1 ); Currently your issue is that your post type and taxonomy rewrite slugs are identical, so the URL base would be the same and it confuses WP. Fortunately there is easy solution, just add this code … Read more

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