how customize tag cloud widget

Marketplace Forums Themes Verbo Verbo Free how customize tag cloud widget

This topic contains 3 replies, has 3 voices, and was last updated by  mythemes 7 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3107

    alessio
    Member

    I would customize the “Tag Cloud” widget layout. I checked the page where the widget was shown and I saw the following code:

    <span>
    <span class=”icon”><i class=”icon-tag”></i>
    </span>
    <span class=”tag-name”>tag_post_category</span><span class=”counter” style=”margin-left: 10px;”>2</span></span>

    but I haven’t found the php file where this code is located. Could you help me?

    Regards.

    #3108

    mythemes
    Member

    This is a default WordPress widget. in our theme we don’t have a code or files with code for this widgets.

    #3109

    arsnova
    Member

    Alessio,

    The styles are located in styles.css file. If you didn’t find the specific style, you can add this style at the end of CSS file to describe the format you need.

    Regards,
    Marco Andrei

    #3127

    mythemes
    Member

    We have a similar widget “myThem.es: Post Tags” – show the tags from current post ( to use only for single post ).

    code is in file: verbo/fw/plg/my_widgets/my_wdg_post_tags.php

    also for Tag Cloud widget we make some changes ( on the DOM ) with jQuery script like this:

        /* TAGS WITH COUNTER */
        jQuery( 'div.widget_tag_cloud div.tagcloud' ).append( '
    ' ); jQuery( 'div.widget_tag_cloud div.tagcloud a, div.widget_post_tags div.tagcloud a' ).each(function(){ jQuery( this ).removeAttr( 'style' ); jQuery( this ).removeAttr( 'class' ); var text = jQuery( this ).text(); var nr = jQuery( this ).attr( 'title' ).split( " " )[0]; jQuery( this ).html( '' + '' + '' + text + '' + '' + nr + '' + '' ); var icon = jQuery( this ).find( 'span.icon' ); var name = jQuery( this ).find( 'span.tag-name' ); var counter = jQuery( this ).find( 'span.counter' ); var icon_width = icon.outerWidth(); var counter_width = counter.outerWidth(); var diff = counter_width - icon_width; var name_width = name.outerWidth(); var width = 0; if( diff < 0 ){ diff = 0; width = name_width + icon_width; counter.css({ 'width' : icon_width + 'px' }); }else{ width = name_width + counter_width; } counter.css({ 'margin-left' : diff + 'px' }); jQuery( this ).css({ 'width' : width + 'px' }); });

    script is located in to: verbo/media/js/functions.js line 62 - 100

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

[email protected] truman