• Resolved poiuy00

    (@poiuy00)


    Before applying generatepress theme, I’m testing in local computer.

    Almost tested except font size of tags. It look too small.

    I inspected tag. It looks like use fixed 8pt size font (refer to below code)

    <a href="https://localhost/tag/gadget/" class="tag-cloud-link tag-link-9 tag-link-position-2" style="font-size: 8pt;" aria-label="GADGET (1 item)">GADGET</a>

    How to increase tag font-size?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi there,

    You can use the Typography Module: https://docs.generatepress.com/article/dynamic-typography-overview/

    Thread Starter poiuy00

    (@poiuy00)

    Thank you for your reply.

    Read and watch related articles. but I can not change font size in tag.

    Could you help me which element is corcerned own tag in below image?

    I try to test with all target elements but failed.

    And i also tested with custom typography.

    I don’t know whether selected tag field is corrected or not.

    When i changed font size, It’s not applied to tag font.

    I try to change font size to 60, 20 and 40.

    Just changed height area.(refer to red arrow in Tags section of right side)

    I think that Tag font size is fixed in somewhere.

    Could you please explain me how to change tag size in detail?

    Thanks in advance

    Set the selector to Custom – p.wp-block-tag-cloud a

    Thread Starter poiuy00

    (@poiuy00)

    Thank you for your reply.

    Test with ‘p.wp-block-tag-cloud a‘ selector but failed.

    Tag font size is not changed at all.

    Do i miss something?

    Try .wp-block-tag-cloud a

    If that doesn’t work, could you host your site live on a staging/test environment so I can view it?

    Thread Starter poiuy00

    (@poiuy00)

    I didn’t purchase any host yet. sorry.

    I try to test more. after then i found something.

    I think that this problem is caused by style attribute in a href tag. (I have already mentioned in above 1st question.)

    If i remove style attribute in inspect devtool of chrome browser, tag font size is change by generatePress Typography manager until before reload page.

    I wondered where below style attribute is injected in every tag link.

    style="font-size: 8pt;" 

    Could you let me know where can i delete or change this style attribute?

    Thanks in advance

    Try Custom – .tagcloud a

    Thread Starter poiuy00

    (@poiuy00)

    Both .wp-block-tag-cloud a and .tagcloud a are not worked.

    Try adding this through Appearance > Customize > Additional CSS:

    .tagcloud a {
     font-size: 20px !important;
    }
    Thread Starter poiuy00

    (@poiuy00)

    Finally it works well.

    Additional CSS works instead of typography manager.

    I can control. Thank you very much.

    Thank you for your kind support again.

    • This reply was modified 9 months, 1 week ago by poiuy00.

    You’re welcome!

    Thread Starter poiuy00

    (@poiuy00)

    Above solution has a one side effect. All tags have the same font size. Generally, In generatePress theme, Tag size is changed depend on tag’s frequency ratio in your blog. You cannot use this feature.

    Hi there,

    the WP tag cloud has the widget_tag_cloud_args hook:

    https://developer.www.ads-software.com/reference/hooks/widget_tag_cloud_args/

    Heres an example PHP snippet to set the Smallest and Largest font size.

    
    add_filter( 'widget_tag_cloud_args', 'set_tag_cloud_font_sizes');
    function set_tag_cloud_font_sizes( $args ) {
        $args['smallest'] = '10';
        $args['largest'] = '18';
    
        return $args;
    }

    Thread Starter poiuy00

    (@poiuy00)

    I’m a newbie on PHP but i found that source code in WP widgets.
    And i tested it with your answer, It works well without any side effects.

    Thanks so much David!!!

    FYI – this article explains how to Add PHP to your site:

    https://docs.generatepress.com/article/adding-php/

    Glad to be of help

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘How to increase tag font size?’ is closed to new replies.