WordPress settings page article keywords and descriptions are different

If you have set the site keywords, then (manually added), so to modify, if not set, add the following code to direct

Step 1: Print directly modify the source files (header.php) or, modify or Login Web: Appearance - edit - select edit (top) header.php file.

Find the code :( role: Set keyword)

<Meta name = "keywords" Content = "here is your keyword Home ..." />

Replace (selected here as the title keyword) is: <Meta name = "keywords" content = "<? ? php echo the_title ();>" /> find the code :( effects: setting description) <Meta name = "the description" Content = "here is your Home description ..." / > replace: <Meta name = "Description" Content = "<PHP IF (is_single ()) {echo mb_strimwidth (the strip_tags (apply_filters ( 'the_content', Post- $?> POST_CONTENT)), 0, 180 [," ") ;} else {echo ( "here is your site's home page description ...");}?> "/> step 2: click the" update file "to save the settings.













So can you! Open an article page, right-click, view source and see the effect it! 

Keywords and descriptions for each page after the completion of such are independent, and very conducive to SEO optimization!

 

Guess you like

Origin www.cnblogs.com/xiaogou/p/11655675.html