WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
[resolved] Show or hide widgets on WP e-commerce store pages (6 posts)

  1. Skygirl
    Member
    Posted 2 years ago #

    Hello, I've been trying to figure out how to show/hide widgets on store pages. The only page option that shows up in the Widget Logic Visual admin options is wpsc_product, when I would like to show a shopping card widget on all store pages (/shop/) and hide others on store pages to reduce distraction. I could exclude other pages one by one, but surely there's a better way...

    Thanks!

    http://wordpress.org/extend/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    i googled 'wpsc_product' and found http://wordpress.org/extend/plugins/wp-e-commerce/, is that the plugin you are using? There's not much to go on there, so I don't know what specific template tags they provide, sorry.

    You could target the URL which I think widget context does easily. YOu can do it with widget logic too, but I don't have any 'ready to go' code for you, sorry.

  3. Skygirl
    Member
    Posted 2 years ago #

    Hi Alan,

    Thank you for replying! Yes, I am using WP E-commerce. I was hoping to target pages with the URL directory /shop/, but I'm not having a lot of luck. I also tried adding the Page Tagger plugin, tagging the store pages uniquely, and using has_tag, but that didn't work either as then it doesn't show up anywhere except the main and checkout pages of the store... not the product listing pages or individual product pages.

    Still working on it; any input is much appreciated!

  4. Skygirl
    Member
    Posted 2 years ago #

    Solved! Thank you Alan... I just realized you mentioned the Widget Context plugin, not the Widget Logic one I was using. MUCH better! Could have saved a LOT of time if I'd found that one sooner... ah well. Yay! :)

  5. theobsidian
    Member
    Posted 2 years ago #

    Hi, I have the same exact problem! With widget context plugin I can just point at a specific URL or category; in this way, if I add a new product a have to set widget context to put the widget on the new page...
    I was thinking maybe I can use a custom field to define if a page/post belongs to the shop and therefore has to show a certain widget, but I can't figure out the code to do it with widget logic..

  6. Skygirl
    Member
    Posted 2 years ago #

    Use Widget Context and just don't set a complete URL. For example. I'm just showing my shopping cart widget on store pages by selecting Show on selected and targeting by URL ... shop*

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic