Open the page with the current slug?

First, I put the following rewrite rule in functions.php: function custom_page_rewrite_rule() { add_rewrite_rule( ‘^category/([^/]+)/([^/]+)/?$’, // Matches /category/news/add-new-post/ ‘index.php?pagename=$matches[2]’, // Loads the page by slug ‘top’ // Priority ); } add_action(‘init’, ‘custom_page_rewrite_rule’); And then changed the “Add New Post” button’s link to this: <?php echo ‘<a href=”‘.home_url(“category/news/add-new-post/”>’; echo “Add New Post”;'</a>’;

Add a trailing slash at the end of the category URLs

Short Answer If your category URLs look like /?category=761, you are still on Plain permalinks. Switch to any “pretty” structure (e.g. /%category%/%postname%/) and save—WordPress will output /category/slug/ with the trailing slash. Already on pretty permalinks and the slash is still missing? Add this in a site-specific plugin or Code Snippets: add_filter( ‘category_link’, ‘force_cat_slash’, 10, 2 … Read more

Remove trailing /feed from permalinks that use a .html suffix

You can achieve this by adding the code to .htaccess file of your apache server. RewriteEngine On RewriteCond %{REQUEST_URI} ^/([0-9]{4})/([0-9]{2})/([^/]+)\.html/feed/?$ [NC] RewriteRule ^ /%1/%2/%3.html [R=301,L] The given code will helps you in set up a redirect so that any request to a post URL with /feed appended will be redirected to the original post URL … Read more

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