Most valid way for the URL html structure

There are different ways to achieve this. Google tries to automatically extract the publish date of an article you wrote. The most common and easiest way for Google is to use rich snippets: http://schema.org/Article See “datePublished” – property for this. After you implemented these little HTML-snippets you can test your markup using the Rich Snippet … Read more

Changing permalinks structure without loosing SEO

You don’t need a plugin to achieve your goal. Use server redirect in the .htaccess file because it will not load the processor to interpret the WordPress PHP code and will not consume time. The redirect will be completed before the WordPress runs. RewriteRule ^[0-9]+/[0-9]+/(.*)\.html$ /$1 [R=301,L] Where [0-9]+/ is the numeric year and month … Read more

how to set title of each page or post for SEO

To properly set the title tag in a theme you shouldn’t put it in header.php manually. Your header.php should have wp_head() somewhere between <head></head>, then you can let WordPress set the title tag by adding support for title-tag to your theme: function wpse_304818_theme_setup() { add_theme_support( ‘title-tag’ ); } add_action( ‘after_setup_theme’, ‘wpse_304818_theme_setup’ );

Custom Canonical URLs

Unfortunately, there’s no filter in the rel_canonical() function. But you can remove that function from wp_head altogether and write your own. Try adding this to the functions.php at your old domain: remove_action( ‘wp_head’, ‘rel_canonical’ ); add_action( ‘wp_head’, ‘new_rel_canonical’ ); function new_rel_canonical() { if ( !is_singular() ) return; global $wp_the_query; if ( !$id = $wp_the_query->get_queried_object_id() ) … Read more

Category.php loads first before page.php?

WordPress select template, following its Template Hierarchy logic. What you have that is category archive, templates for individual pages are never considered for it. Also.. with the view of SEO, page.php is more important then category.php.. right? PHP template file is entirely back-end concepts, it doesn’t have anything to do with SEO inherently.

How to rewrite title- and meta-description templates for page templates in Yoast Plugin [closed]

You may consider the use of both filter wpseo_metadesc (for meta description) and wpseo_title (for title). The idea is to change the values of title and/or description depending if you meet some condition. So your code will look to somthing like this: add_filter(‘wpseo_metadesc’,’custom_meta’); function custom_meta( $desc ){ if (/* do your test here to check … Read more

How to hide sensitve page from google spiders and non-membres in wordpress!

Use password protection mechanism Alterative you can use wordpress hook in your theme to show your post/page only for administrators this way: add_action(‘wp’, function() { if(is_page(‘my-data’) && !current_user_can(‘manage_options’)) die(“123”) }); Note: don’t use this code. It is just for demonstration. Better use hook template_redirect or something else. We need more info about your environment to … Read more

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