Remove link function from oembed image or video

WordPress has very limited control over the embedded content. When you put URL to YouTube video (for instance), WordPress calls the oEmbed URL for that service (YouTube in this case), and YouTube returns the complete HTML for embedding the content. That can be a different thing, including IFRAME, and each service has own oEmbed content … Read more

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