• Resolved vincentscarrubba

    (@vincentscarrubba)


    I am using this shortcode for a WooCommerce store. I would like to use the shortcode to display plain text terms for the attribute, no bullet list, no hyperlink. Is there a way to do this without editing the PHP?

Viewing 4 replies - 1 through 4 (of 4 total)
  • 99w

    (@ninetyninew)

    Hi,

    This extension is primarily used to to display a linked list of terms from a product attribute, such as all brand links from a brands attribute.

    However, depending on your attributes configuration it may be possible to achieve this.

    The list won’t be linked if you are using the shortcode with archive links enabled e.g.

    [wcpas_product_attributes attribute="your-attribute" archive_links="1" hide_empty="0"]

    And where the attribute in Products > Attributes > Hover over the attribute and click edit, and have archives disabled.

    The configuration above would stop links appearing as there are no archive pages to link to.

    Then you could change the styling of the list to display like a singular line using some custom CSS like this:

    .wcpas-product-attributes {
    	list-style: none;
    	margin: 0;
    	padding: 0;
    }
    
    .wcpas-product-attributes li {
    	display: inline;
    }
    
    .wcpas-product-attributes li:after {
        content: ', ';
    }
    
    .wcpas-product-attributes li:last-of-type:after {
        content: '';
    }

    This is of course dependent on whether you require archive pages to be enabled for those, however if you do I don’t see why you wouldn’t link through to them.

    We’ll investigate adding the ability to display as a singular line linked/non-linked in for potential inclusion in future releases.

    Thank you,

    • This reply was modified 11 months, 3 weeks ago by 99w.
    Thread Starter vincentscarrubba

    (@vincentscarrubba)

    Thank you for the help with this.

    What I’ve been trying to accomplish is to display a list of very specific Product Attributes and their corresponding term values on product pages in a tabular format. Your plugin and shortcode is the only thing I’ve found that gets me close.

    Thread Starter vincentscarrubba

    (@vincentscarrubba)

    Does your plugin not filter attribute terms that are applied to a specific product? I am looking at a product page on my site where I am using your shortcode, and what is displaying are ALL attribute terms that are associated with any product in my store, not just the terms that are associated with the product currently shown on the page.

    99w

    (@ninetyninew)

    Hi,

    The shortcode displays a list of terms from a product attribute, such as all brand links from a brands attribute.

    It is intended to be used where you want to display a full list of all the terms, e.g. to include a list of all brands in the footer of a website.

    It doesn’t show the terms associated with a product on a product page. WooCommerce already does via the “Additional information” tab and isn’t what this extension is intended to do.

    Thank you,

    • This reply was modified 11 months, 2 weeks ago by 99w.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Plain Text List of Terms’ is closed to new replies.