rebuilding/ rewriting a url to make it SEO friendly

You can create a rewrite rule using add_rewrite_rule() that will match a given path to query parameters: function wpse_283774_rewrite() { add_rewrite_rule( ‘^events/([^/]+)/?’, ‘index.php?pagename=events&country=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpse_283774_rewrite’ ); This rule will match whatever is after /events as the country query parameter. Setting the third argument to top means that it will match our … Read more

Find internal links to post

It seems that finding your internal links is as simple as searching your site using the build in WP search widget! You just paste the link you are searching for and WP will show you all post or pages containing the link (no matter what anchor you used). I didn’t know the default search function … Read more

Change username link in admin bar

Create the following directory and file. wp-content/mu-plugins/admin-bar-tweaks.php Or, you can add this to your theme’s functions.php file. In the script below, remember to set $new_url to whatever you desire. <?php // Requires PHP 5.4+. add_action( ‘admin_bar_menu’, function( $wp_admin_bar ) { $new_url=”http://example.com/custom/location”; if ( $wp_admin_bar->get_node( ‘my-account’) ) { $wp_admin_bar->add_node( [ ‘id’ => ‘my-account’, ‘href’ => $new_url, … Read more

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