In most WordPress blogs, sidebars are loaded with content, widgets, banners, links, videos, etc. so many will try to crop the loaded content from the sidebars, in this process, I have moved the tag cloud or tag archive section to a new page in WordPress.
I hope this will be really helpful for the bloggers who are looking out to sort out their pages/widgets and make their blog look cleaner.
Just follow these simple steps to create a Tag Archive page:
- Create a php page you can name it as “tag_archive.php”
- Place the code blow in the new page created
Template Name: TAG Archive
<?php get_header(); ?>
<?php wp_tag_cloud(‘smallest=15&largest=35’); ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
- The first line “Template Name: TAG Archive” defines your newly created page name
- Use the functions get_header(); to include header, get_sidebar(); to include your sidebar and use get_footer(); for footer
- Use wp_tag_cloud function to include your tag cloud and adjust your font sizes via smallest and largest parameters
- Make sure you are going with your default theme look and feel
- Once you are done, upload tag_archive.php in your theme directory
- Then create a new page in your blog called Tag Archive via wordpress interface admin
- And choose “Tag Archive” as your Page Template dropdown
- That’s it save and publish the page – your Tag Archive page is created
Found this article useful? Let me know if you are looking out for any scripts or solutions etc, will share the same with you all.