WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Hide layered nav div if URL is this and attribute that? (1 post)

  1. MarceFX
    Member
    Posted 1 year ago #

    Hi,

    I'm trying to hide one of the three layered nav widgets on my site, for each of my 3 attributes. I have 3 filter widgets:

    pa_attribute1
    pa_attribute3
    pa_attribute3

    I want to do this:
    ---
    If URL = /path/ and taxonomy = pa_attribute3 {

    <div style="none" id="pa_attribute3">
    }
    ---

    I can't find how to achieve this on widget-layered_nav.php. I tried:

    $uri = $_SERVER['REQUEST_URI'];
    		$pieces = explode("/", $uri);
    		$uri_marca= $pieces[3];						
    
    					if ($uri_marca == 'marca') {
    
    					echo '<div class="caja_select" style="display=none !important;" id="pa_attribute3"><select>';
    
    					}
    
    					else { the rest }

    This is, obviously, not working, since no widget is shown. Any ideas?

    Thank you

    http://wordpress.org/extend/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.