How to add category cloud in single post / page in wordpress

Category cloud can be added by using the taxonomy argument to cause a cloud of categories to display. You can either modify wp-content/yourtheme/single.php from ssh or using ftp OR you can login to wordpress dashboard, and go to “Appearance -> Editor -> ad click “single.php”

Post below line,

<?php wp_tag_cloud( array( 'taxonomy' => 'category' ) ); ?>

After,

 
<div class="thecontent">
    <?php the_content(); ?>
</div>

So, the final change could look like as below,

<div class="thecontent">
    <?php the_content(); ?>
</div>
<?php wp_tag_cloud( array( 'taxonomy' => 'category' ) ); ?>

To update into single page, modify the page.php as above.

Reference – https://codex.wordpress.org/Function_Reference/wp_tag_cloud#Display_a_Category_Cloud

Android Android Commands Android Java Applications Application Libraries Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded

Leave a Reply