Menu
Is free
registration
home  /  Multimedia/ Wordpress gallery with tag cloud. Enhancing WordPress Tag Cloud with plugins

Wordpress gallery with tag cloud. Enhancing WordPress Tag Cloud with plugins

WP-Cumulus: 3D cloud of placemarks on flash (improved Russian version). The WP-Cumulus plugin is already old and many have heard of it, and even more have seen it. It provides the ability to display a cloud of marks in the form of a rotating 3D cloud, very beautiful. You should see his work above. Plugin author Roy Tanck.

Download

Version support: WP 2.8+

Screenshots

Settings

The settings are all described in the plugin and you shouldn't have any questions about them in the screenshots. Except, perhaps, the option Parameters of the wp_tag_cloud function. In it, you can specify how and what links will be displayed in the cloud. For example, "number = 20 & exclude = 12" will only print 20 tags, even if there are more, and will exclude tag 12 (tag ID).

All possible parameters for this parameter:

  • smallest - text size for labels with fewer entries. The default is 8.
  • largest - the size of the text for labels with big amount records. The default is 22.
  • unit - The unit of measure for size for smallest and largest. Can be: pt, px, em,%. By default pt.
  • number - the maximum number of labels that will be shown. If set to 0, then all labels will be shown without limitation. The default is 45.
  • exclude - exclude the specified labels. You need to specify the ID, separated by commas.
  • include - show only the specified tags. You need to specify the ID, separated by commas.
  • taxonomy is the name of the taxonomy from which the cloud will be built. Thanks to this option, you can infer terms from any taxonomy, not just tags or categories.

Parameters are concatenated with &: number = 20 & exclude = 12.

3D cloud output in template

If you need to display the wp-cumulus cloud directly in the template, without using a widget or shortcode, then in the template code you can use the wp_cumulus_insert ($ options, $ links) function. The output can be customized by passing the desired parameters. Settings from the admin panel will be interrupted by these parameters.

Parameters that can be passed:

$ options = array ("width" => "550", // flash "height" width => "375", // flash "tcolor" => "ffffff", // big links color "tcolor2" => "ffffff", // color of small links "hicolor" => "ffffff", // color of the hover link "bgcolor" => "333333", // background color "speed" => "150", // rotation speed " trans "=>" false ", // transparent background flash "args" => "", // arguments passed to the wp_tag_cloud function. Ex .: largest = 20 & smallest = 12 & number = 40 "mode" => "tags", // which links to display: tags (tags), cats (categories), both (tags and categories) "compmode" => "js", // embed code flash: js (javascript), empty (object) "showwptags" => 1, // whether to show HTML links if flash does not work in the browser); wp_cumulus_insert ($ options);

Examples of 3D cloud output in the template

# 1 Let's display a flash block of tags with a white background, size 300x225 pixels.

To do this, open the theme file, for example, sidebar.php and paste the following code in the right place:

"300", "height" => "225", "bgcolor" => "ffffff")); ?>

# 2 Bring out a cloud of 20 terms from an arbitrary taxonomy "authors", specify a rotation speed of 300:

"taxonomy = authors & number20", "speed" => "300")); ?>

# 3 Display any links

In addition to taxonomy terms, you can display any links in the cloud. This example shows how to display permanent pages, for this we specify the second argument of the $ links function:

-1, "post_type" => "page",)); // create a link string $ links = ""; foreach ($ posts as $ post) ($ fsize = rand (12,28); $ links. = "ID)." ">". $ post-> post_title. ""; ) wp_reset_postdata (); // print wp_cumulus_insert ("", $ links); ?>

3D Cloud without plugin

If you do not want to connect the plugin, then the cloud can be displayed without installing the plugin. For this:

    Download this archive and place the folder from it (wp-cumulus-not-plugin) in any directory, let it be the theme directory;

  1. In the place of the template where you need to display the cloud, connect the wp-cumulus.php file and use the wp_cumulus_theme_flashcode ($ options, $ links) function.
"600", // flash width "height" => "450", // flash height "tcolor" => "3D3644", // color of large links "tcolor2" => "7E748C", // color of small links " hicolor "=>" DE1E1C ", // color of the hover link" bgcolor "=>" ffffff ", // background color" speed "=>" 300 ", // rotation speed" mode "=>" tags ", // display tags (tags), categories (cats) or both "args" => "largest = 16 & smallest = 10 & number = 30", // arguments passed to the wp_tag_cloud function // "folder_url" => get_stylesheet_directory_uri (). "/ wp-cumulus-not-plugin /" // url to the php file folder)); ?>
Does not work?

The wp_cumulus_theme_flashcode () function, when displaying a flash object, includes 2 files: swfobject.js and tagcloud.swf. The function determines the URL of these files automatically (they must be in the same directory as the wp-cumulus.php file). If the URL has been identified incorrectly, then the cloud may not work. Therefore, when calling the function, you may need to specify the folder_url parameter, in which you specify the URL to the folder where these 2 files are located.

Do you want to place your tags on the cloud, or rather, on the dynamic cloud, which is always in motion and attracts the attention of site visitors? I think so, because today I received several letters with a question: to the blog. And if there are those who still do not know whether he needs it or not, or do not know what they are talking about at all, then just look at the main page of my blog and rate how you WordPress tag cloud.

Let's get down to business: to install WordPress tag cloud you need to install and activate plugin WP Cumulus. At the same time, please, ATTENTION, that this plugin must be downloaded independently from the Internet! Mandatory Russian version !! Otherwise, if you use the search on the Add plugin tab, the search will find the English version of this plugin, which will not be able to work correctly with your Russian tags.

  1. PUA - Plugin - Add plugin - Upload file.
  2. Activate.
  3. Configure plugin.

What does it mean to set up a plugin? Let's not customize and just see how our cloud looks on the page!

To add a cloud to a page, select the Tag Cloud Widget and drag it to the sidebar. Ready? Then go to view home page site.

And How? All good?

  • Text color, background color suit?
  • Test the tags: click on any tag and see the result. By the way, did you manage to click on the tag? Are you satisfied with the rotation speed?
  • By the way, pay attention to whether your cloud fits into the size of the side bar! During the initial installation, the dimensions of the cloud did not match my sidebar.
  • How are your tags located? Don't you think that they are huddled together? If yes, then be sure to check the box in the plugin settings in order to evenly arrange the tags on the cloud.

So, after all, let's go back to the cloud settings page and tweak everything that doesn't suit us.

To configure the plugin, feel free to click LMB on the WP Cumulus plugin name on the Settings tab. Make the changes you need, go to the site and admire the changes. Just ATTENTION, after making changes, be sure to check how it looks in reality, and if anything, return the parameters to their place.

By the way, the same plugin settings can be done if you click on the Cloud of tags on the Widgets tab.

DO NOT FORGET! I draw your attention to the fact that you must definitely check the box

Arranges tags at equal distances from each other instead of randomly

otherwise your tags may clump together and you won't get pleasure and beauty from the cloud!

By the way, I almost forgot to warn you: plugin only needs to be set if there is at least one tag !!! If there are no tags, be sure to open articles and add tags !!!

Let's summarize:

  • found out why you need WP Cumulus plugin
  • downloaded WP Cumulus plugin
  • learned how to install, activate, configure plugin WP Cumulus
  • learned, how to install WordPress tag cloud on blog

I tested this cloud for three months and decided that for now I will remove this cloud from my site. Testing the blog without a tag cloud.

In this article, I'll walk you through three ways to display a tag cloud on a blog. Each withdrawal method has its own advantages. Let's take a look at each method separately.

1st method. Displaying a tag cloud with php code
Benefit: The tag cloud can be displayed anywhere.

By the way, recently, this method helped me a lot on one of my sites, since I needed to set my own style for the title and the tags themselves.
Disadvantage: You need to be able to work with codes. Unfortunately, not everyone likes or even knows how to fix something in files.
Here's the code itself:

Tag cloud:

Paste the code anywhere in your theme (template) file.

Extra options :

○ The parameter "smallest" - defines the font size of the tag with the least popularity.

○ The "largest" parameter defines the font size of the most popular tag.

We combine the two parameters "smallest" and "largest":

○ Parameter "number" - determines the number of displayed tags on the page

○ The "orderby" parameter - sorts tags by name (name) and popularity (count)

Or

○ The "order" parameter - displays the tag cloud in alphabetical order - ASC (A-Z), DESC (Z-A) and RAND (random output order).

○ The "exclude" parameter will help to exclude unnecessary labels from the general list. Write the ID of the tags separated by commas.

○ The "include" parameter - will help to specify which labels to output in common list... Write the ID of the tags separated by commas.

2nd way

Benefits: It's fast.
Disadvantages: there are restrictions in the settings, and it is not always possible to arrange it the way you want.
So go to admin panel => "Appearance" => "Widgets"... On the left, find the Tag Cloud widget. Click on it

and choose an available place to insert the widget.

3rd way. Displaying a cloud of tags through the plugin "wp-cumulus" or "Tag Cloud Canvas"
"WP-Cumulus" or "Tag Cloud Canvas" is a plugin for creating a 3D tag cloud in WordPress and after installation the tag cloud looks like this:

You can download the WP-Cumulus plugin and see how it is configured at this address:

https://mywordpress.ru/plugins/wp-cumulus-oblako-tegov/

Download plugin "Tag Cloud Canvas":

https://wordpress.org/plugins/tag-cloud-canvas/

Advantages: beautiful and fast output of the mark cloud.
Disadvantages: not always suitable for blog design, as well as unnecessary load on the blog.

That's all, friends! I wish you to make the right and successful choice!

In this post we will break down the plugin. WP-Cumulus which displays labels (tags) in the form of a movable volumetric sphere ( flash).Tag Cloud it is convenient that the visitor will not need to search for articles of interest to him in all headings, but simply use the tags.

Plugin installation and configuration

1. Your WordPress version must be 2.3 or higher. Tag cloud forWordpress will not work with older versions.

2. Download the Russian version We drop the wp-cumulus folder into your plugins directory ( wp-content / plugins /).

3. Activate the plugin in the admin area.

All plugin settings are located in ( Parametermax \ WP Cumulus)... If suddenly you do not have a checkmark in the plugin settings, ( Arrange tags evenly on the sphere) then you must definitely put it. Otherwise, the tags in the cloud will run over each other and will not be beautiful.

To display a wordpress tag cloud, you have three options.

1. If you need to insert wordpress cloud to an article or page, add the tag to it

This tag will be replaced with flash tag cloud when viewing the page.

2. To insert wordpress tag clouds use the code through the template:

3. If you want to display the tag cloud in the sidebar. Then you need to go to ( Design \ Widgets) and add a widget.

The widget has a separate set of settings, so we can change the background color, size, etc.

Customize this widget the way you want and click on " Save".

Everything has been translated into Russian, I think you can figure it out.

We all know that tags are an important part of WordPress taxonomies, and they serve as a tool for organizing them. Tags are created on the fly during the post creation process and help us find similar posts associated with specific tags. Typically, in a WordPress blog, various tags are grouped within a tag cloud, and the size of each tag is determined by the frequency of its use in posts. In this article, we will show you how to use the function correctly wp_tag_cloud () which is responsible for all these tag clouds.

Introduction

This is the main function built into the core to display the tags assigned to your posts, which displays the tag cloud.

8, "largest" => 22, "unit" => "pt", "number" => 45, "format" => "flat", "separator" => "\ n", "orderby" => " name "," order "=>" ASC "," exclude "=> null," include "=> null," topic_count_text_callback "=> default_topic_count_text," link "=>" view "," taxonomy "=>" post_tag " , "echo" => true); ?>

In the WordPress Codex page wp_tag_cloud () clearly explains all of these function parameters, but let's take a quick look at the most basic ones.

  • 'Smallest'- This parameter defines the minimum size of the text in the tag cloud.
  • ‘Largest’- This parameter determines maximum size text in the tag cloud.
  • ‘Number’- This parameter determines the total number of tags displayed in the tag cloud. You can specify '0' if you want all
  • 'Format'- This parameter determines the display format of the cloud. It can take on the values' flat‘, ‘list', or ' array
  • 'Separator'- This parameter defines the tag separator in the cloud
  • ‘Topic_count_text_callback’- This parameter displays the number of entries assigned to each tag as a tooltip
  • ‘Taxonomy’- This parameter defines the type of WordPress taxonomy that can be used in the tag cloud. The default is ‘ post_tags'But you can use custom taxonomies too

These parameters play a key role in customizing the tag cloud.

Usage

WordPress has a standard Tag Cloud widget that can be placed in the appropriate area of ​​the page. However, even without using a widget, you can use the function wp_tag_cloud () to display and customize the tag cloud on your blog. You can also specify parameters in a variety of ways.

Parameters are separated with ‘&’ in one simple line.

Specifying parameters in array format.

"10", "largest" => "50", "unit" => "px", "number" => "45", "separator" => "::", "orderby" => "count", "order" => "RAND")); ?>

We indicate only the selected parameters, the rest are left as they are by default.

We return the tag cloud as an array without displaying it in the blog. The result can be used later in PHP code.

Practical examples

Example 1: Displaying a tag cloud in the sidebar or footer of your theme

Create a function in your file functions.php and return the function wp_tag_cloud ()... Once defined, you can call this function anywhere in your blog.

Function my_cloud ($ echo = false) (if (function_exists ("wp_tag_cloud")) return wp_tag_cloud ();)

Now let's open your file sidebar.php and call a function to display the tag cloud.

Popular tags"; my_cloud ();?>

Let's add a little CSS styles to our file style.css in order to make the tag cloud look more decent.

Mycloud a (background: # FFC414; color: # 0000FF; display: inline-block; margin: 0 4px 8px 0; padding: 2px 10px; -webkit-border-radius: 20px; -moz-border-radius: 20px; border -radius: 20px; font-size: 10px;) .mycloud h3 (font-style: italic; font-weight: bold; font-size: 30px; color: # FF00FF; font-family: Comic Sans;)

This is how it looks now:

We do the same in footer.php your theme.

You can make it even prettier by adding your own CSS styles.

By adding various parameters to the function wp_tag_cloud () to file functions.php we can customize our tag cloud. For example, if you want to include both tags and categories in the tag cloud or the taxonomy cloud, then the function should be written as follows:

Wp_tag_cloud (array ("taxonomy" => array ("post_tag", "category")));

Example 2: Create a Tag Cloud Page for Your Blog

Sometimes you just don't need to move the tag cloud to the sidebar or footer, but you need to create for them separate page for the purpose of "cleanliness" appearance blog. This can be done in the following way.

First, let's create our own page template in your theme folder with the function wp_tag_cloud ()... We will call this file tagcloud.php.

Now you need to go to the WordPress admin area and go to Pages -> Add New... Set the desired title to the page, and then in the section Page attributes select a template for it - Tag Cloud, and then click Update. That's all. Your tag cloud page is ready. You can colorize it with CSS.

Example 3: Create a Scrollable Tag Cloud Block for the Sidebar

You can prompt users to select tags in the sidebar from a scrollable block. To do this, you need to create a function in the file functions.php.

Function cloudbox () (if (function_exists ("wp_tag_cloud")) ($ tags = wp_tag_cloud (array ("smallest" => 10, "largest" => 10, "orderby" => "name", "order" => "ASC", "format" => "array")); foreach ($ tags as $ tag) (echo $ tag. "
"; } } }

In the function above, we used the function array format wp_tag_cloud (), the font was left the same as it was, and the list was sorted by name in descending order.

Now we open our sidebar.php and call this function.

Please select a tag

Let's style it with CSS.

#cloud (background: #FFFFCC; height: 200px; width: 200px; margin: 0 auto; overflow: scroll; border: 4px solid # 000000; padding: 2px; text-align: justify;) #cloud a (background: # 400000; color: # FFFF00; display: inline-block; margin: 0 4px 8px 0; padding: 2px 10px; -webkit-border-radius: 20px; -moz-border-radius: 20px; border-radius: 20px; font -size: 15px;) #text (font-style: italic; font-weight: bold; font-size: 20px; color: # FF9900; font-family: Comic Sans;)

As a result, the block will look like this.