Plain to postname permalinks not working
Plain to postname permalinks not working
Plain to postname permalinks not working
It depends on your server. If you’re on an Apache server, you could use the .htaccess file. If you’re on NGINX, there is a .conf file. Your web host may (or may not) be able to help you with this. Or, you could use a plugin. There are many redirection plugins available – you may … Read more
Show custom post type relationships by taxonomy
Try to rewrite the taxonomy url in the .htaccess RewriteRule ^produce_category(.*)$ /$1 [L] (Not tested)
force permalink slug for page vs post_type slug parent
custom-taxonomy/post_name instead of the default post_type/post_name
How can achieve this permalink perfectly? domain.com/%category%/%post-name%
Check your rewrites to make sure it follow this if (!-e $request_filename) { rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last; rewrite ^/[_0-9a-zA-Z-]+.*(/wp-admin/.*\.php)$ $1 last; rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last; } not this if (!-e $request_filename) { rewrite /wp-admin$ $scheme://$host$request_uri/ permanent; rewrite ^(/[^/]+)?(/wp-.*) $2 last; rewrite ^(/[^/]+)?(/.*\.php) $2 last; }
This code works good for me: add_filter( ‘post_link’, ‘custom_permalink’, ‘author_link’, 10, 3 ); function custom_permalink( $permalink, $post, $leavename ) { // Get the category for the post $category = get_the_category($post->ID); if ( !empty($category) && $category[0]->cat_name == “Tips” ) { $cat_name = strtolower($category[0]->cat_name); $authordata = get_userdata( $post->post_author ); $author = $authordata->user_nicename; $permalink = trailingslashit( home_url(“https://wordpress.stackexchange.com/”. $cat_name … Read more
Get post text (by its URL) from database dump