WordPress
October 13, 2021

Display Popular Tags in WordPress

you’ll need to add following code to your current themes functions.php file.

10,
‘largest’ => 22,
‘unit’ => ‘px’,
‘number’ => 10,
‘format’ => ‘flat’,
‘separator’ => ” “,
‘orderby’ => ‘count’,
‘order’ => ‘DESC’,
‘show_count’ => 1,
‘echo’ => false
);

$tag_string = wp_generate_tag_cloud( $tags, $args );

return $tag_string;

}
// Add a shortcode so that we can use it in widgets, posts, and pages
add_shortcode(‘wc_popular_tags’, ‘wc_tag_cloud’);

// Enable shortcode execution in text widget
add_filter (‘widget_text’, ‘do_shortcode’);

?>

Related Post


Enable SVG Support in WordPress

For Enable svg support you’ll need to add the following code to your current themes functions.php file.

Delete Old Post in WordPress

We want to delete old post in easy way, Add the following code to your current themes functions.php file and reload your page and see your post may have been deleted.

Adding Custom Meta Fields to Taxonomies in WordPress

For add Custom Meta Field in taxonomy use following code in your current themes functions.php file.

Featured image metabox not appearing on custom post edit page

Sometimes theme not support featured image metabox, when put following code in your current themes functions.php file. function my_custom_theme_setup() { add_theme_support( ‘menus’ ); add_theme_support( ‘post-thumbnails’ ); // other options } add_action( ‘after_setup_theme’, ‘my_custom_theme_setup’ ); Now featured image metabox support in custom post edit page.

How to Create Custom Taxonomies in WordPress

Custom Taxonomies are same like categories and tags. WordPress allows developers to create Custom Taxonomies. Custom Taxonomies are useful when one wants to create distinct naming systems and make them accessible behind the scenes in a predictable way. Create Custom Taxonomies by code. Add below Code in function.php file of your active child theme (or […]

Add ACF Options Page in WordPress

To create an options page, open up your current themes functions.php file and add the following code: Without passing any parameters to this function, the default options page will be added to your wp-admin sidebar.


Leave a Reply

Your email address will not be published. Required fields are marked *