-
AuthorPosts
-
October 23, 2019 at 8:32 pm #1150621
Hello
I have a popular tag widget in column 2 of my footer as a test –
I have tag counts turned on and Japan (15) should be there but there’s no sign of Canada (35) or USA (34), and most of the others have only 1 or 2. I need this to display the most popular, as the widget claims to do, please.
Also, how can the number of popular tags be adjusted, please, like the combo widget tags?I also have a combo widget in the 1st column and even set to 100 tags it’s also missing Canada and USA. Is there a way to set the combo widget to show most popular? That’s easy to adjust the numbers, though.
Thanks in advance.
October 29, 2019 at 9:27 pm #1152147Hey webWahine,
Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
BasilisOctober 30, 2019 at 9:30 pm #1152517Hello, Basilis
I found a great post that makes it really easy to adjust, so I wanted to share. I used the PHP version in the functions.php for my child theme, then simply added in the shortcode and it’s perfect! there are also 2 good plugins that are even easier to play around with :)
[wpb_popular_tags]
Here’s the article –
https://www.wpbeginner.com/plugins/how-to-display-most-popular-tags-in-wordpress/
<?php function wpb_tag_cloud() { $tags = get_tags(); $args = array( 'smallest' => 12, // default is 10 'largest' => 12, // default is 22 'unit' => 'px', 'number' => 30, // default is 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('wpb_popular_tags', 'wpb_tag_cloud'); // Enable shortcode execution in text widget add_filter ('widget_text', 'do_shortcode');
November 1, 2019 at 5:51 am #1152926Hi,
Great, I’m glad that you found a solution and thanks a lot for sharing, it’s much appreciated :-)
Best regards,
RikardNovember 1, 2019 at 11:56 pm #1153158Hi, Rikard
The option I mentioned worked except for the fact that it didn’t actually load the posts with those tags, so that was replaced with the second option, ie, the free simple tags plugin, which is working properly.
I do have another post connected to this dynamically generated page because the title for the page when the user clicks on a tag is a generic ‘Posts’. there are older posts here on Enfold that resolve this but not your latest version, so I’m waiting to see how to modify your newer code.
Here’s my post about the page titles –
https://kriesi.at/support/topic/change-page-title-for-tag-click-results/
November 11, 2019 at 4:29 am #1155470Hi,
Looks like the other inquiry has been solved, so we’ll close this thread now.
// https://kriesi.at/support/topic/change-page-title-for-tag-click-results/
Please don’t hesitate to open a new thread if you need anything else. Have a nice day.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Popular tags widget not displaying the most popular tags’ is closed to new replies.