Create a filter from tags - by Ionut Mandru

This topic has 6 replies, 3 voices, and was last updated 5 years, 3 months ago ago by Olga Barlow

  • Avatar: Ionut_Mandru
    Ionut Mandru
    Participant
    January 4, 2019 at 00:46

    Hello.
    How can i create three filters from tags? I do not want to use a plugin to create that filters.
    I know I can create attributes for articles but I want to use my tags.
    Thanks for your answer

    5 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 4, 2019 at 08:50

    Hello,

    By default, there is Product Tag Cloud widget only https://docs.woocommerce.com/document/woocommerce-widgets/
    you can change Cloud view http://prntscr.com/m2vr0e to List http://prntscr.com/m2vquv using this code in functions.php of child theme:

    add_filter('woocommerce_product_tag_cloud_widget_args', 'xs_woo_tag_cloud_filter');
    function xs_woo_tag_cloud_filter($args) {
    	$args = array(
    		'smallest' => 14, 
    		'largest' => 14, 
    		'format' => 'list', 
    		'taxonomy' => 'product_tag', 
    		'unit' => 'px', 
    		);
    	return $args;
    }

    + add this code in style.css of the child theme:

    .sidebar-widget .wp-tag-cloud li a {
        font-size:  1.1rem !important;
        text-transform: capitalize;
        border:  none;
        margin: 0px;
    }
    .sidebar-widget .wp-tag-cloud li a:hover {
        background-color:  transparent;
        color: black !important;
    }

    If you want to add additional filters, some additional plugins need to be used or you can achieve the desired result by additional customization in files (which is beyond our basic support scope).
    Feel free to ask if you have any other questions.

    Regards

    Avatar: Ionut_Mandru
    Ionut Mandru
    Participant
    January 4, 2019 at 09:20

    Thanks for answer, but i have a “small problem”. When i install the theme i forgot to create the child theme.
    Can i create now the child theme after i made changes( no file in the theme has been modified, just css on wpbakery or theme custom css)
    Thanks

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    January 4, 2019 at 09:35

    Yes, you can. The child theme is included in the theme package. Find the xstore-child in the package, or download from this page https://www.8theme.com/downloads/ http://prntscr.com/m2w7ms , and upload it to the /wp-content/themes/ folder https://prnt.sc/m2w75w
    Go to Appearance > Themes and activate the child theme on site. Before the activation, please check Appearance > Widgets and make sure that you know where every widget is placed because they could be messed up.

    Regards

    Avatar: Ionut_Mandru
    Ionut Mandru
    Participant
    January 4, 2019 at 12:14

    Thanks, i create the child theme without any problem.

    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    January 4, 2019 at 12:52

    I’m glad to hear that.

    Regards

  • Viewing 6 results - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.