• hamidlah

    (@hamidlah)


    Hi,

    I have add you plugin in my Woocommerce webiste, and I want only to show the designers attributes “pa-designer” of my products. the plugin now display only products not attributes
    Id there any shortcode or function hook that I can use.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dani Llewellyn

    (@diddledani)

    Hi,

    Product Attributes are saved as a taxonomy, so you want to use something like this to show their names:

    [a-z-listing display="terms" taxonomy="pa-designer"]
    
    Thread Starter hamidlah

    (@hamidlah)

    Thanks you Daniel, your shorcode work great

    Thread Starter hamidlah

    (@hamidlah)

    Hi Daniel,

    When I add you shorcode, everything is working fine except the link from designers to the appropriate page.

    when I click in Designer it redirect me to http://domain.com?taxonomy=pa_designer&term=babe-tess

    but my page link that display the designer is http://domain.com/shop/?filter_designer=babe-tess

    how can I much your url link to be as my link now.

    Many thanks

    Hi hamidlah,

    This is shortcode

    [a-z-listing post-type=”product” taxonomy=”pa_designer” display=”terms” ]

    ————-

    You change “get_the_permalink” in “wp-content\plugins\a-z-listing\src\Query.php”

    public function get_the_permalink() {
    $itemLink = explode( ‘=’, $this->current_item[‘link’] );
    $termm = explode( ‘_’, $itemLink[1] );
    $termm = explode( ‘&’, $termm[1] );
    $link = get_permalink(wc_get_page_id(‘shop’)).’?’.’filter_’ . $termm[0] .”=”.$itemLink[2];
    return $link;
    }

    [a-z-listing post-type=”product” taxonomy=”pa_designer” display=”terms” ]

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

The topic ‘Woocomerce Attribute’ is closed to new replies.