How to make WordPress tag tags page

Time:2020-2-26

p. S. in SEO, baidu seems to prefer the keyword tags

In fact, to write a new page, it needs to apply a custom template named tags.php

The contents of tags.php are as follows

Copy code

The code is as follows:

<?php
/*
Template Name: Tags
*/
?>
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div>
<div>
<h2>Tags</h2>
<div>
< PHP WP > tag > cloud (‘smallest = 12 & largest = 12 & unit = PX & number = 5000 ‘);? > / / smallest is the minimum font size, largest is the maximum font size, unit is the unit, number is the number of display keywords, the default is 45
</div>
</div>
</div><!– end narrwocolumn –>
<?php get_footer(); ?>
<?php
/*
Template Name: Tags
*/

This sentence must not be less, or there will be no template file that can be applied when writing the page.

Upload tags.php to the template directory

Then click background – > compose – > compose page title as tags. The content of the page is empty. The most important step is to select the page module. In addition to the default, there is a new option, which is to select the tags.php template just built. Because I enable the custom permanent link, so the page abbreviation is also necessary. It’s the same as before. It’s named tags (whatever it is)

Release OK

Then add a link to the sidebar and power it up.

Recommended Today

Laravel service container must know

The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t To learn how to build an application with laravel is not only to learn how to use different classes and components in the framework, but also to remember allartisanCommand or all helper functions (we have Google). Learning to code with laravel is […]