Support

Home Forums Event Espresso Premium Hide some filters in [CUSTOM_EVENT_VIEW}

Hide some filters in [CUSTOM_EVENT_VIEW}

Posted: August 13, 2014 at 7:27 am

Viewing 6 reply threads


Pim Stumpel

August 13, 2014 at 7:27 am

Hi,

The website i am working on is: http://www.dinghycoach.nl/clinics-events/
I read one of the other topics about hiding some of the filters in my custom event view table. (Because i use several pages with custom event views and different categories and i don’t want to show all categories in the filters)
No i’ve set for example:
body.page-id-12 .cat-5{
display: none;
}

So for page 12 i don’t want cat-5 to show in the filter.
This code does work in firefox, where cat-5 is not visible, but it is not working in safari/ie/chrome.
Could you tell me what code i should use to make it work in all browsers?
i’ve read something online that it could be because the dropdown menu is not between

  • or something and that’s why you can’t select the elements correctly or something.

    I have nooo idea hope you can help!

    cheers

    Pim & Ruby


    Tony

    • Support Staff

    August 13, 2014 at 8:43 am

    Hi Pim & Ruby,

    Using Chrome Dev Tools on the page you linked to I can see the CSS code you’ve included to exclude some categories. However you mention it is not working with Chrome or IE, it does for me. Can I ask which version of Chrome are you using?

    IE does not allow you to hide option elements with CSS. You can add inline styles to each of those options and test in IE and they would still display.

    In order to remove them from view within IE they would need to be removed from the page using JavaScript.


    Lorenzo Orlando Caum

    • Support Staff

    August 13, 2014 at 8:43 am

    Hi,

    Try this in your child theme’s functions.php file:

    https://gist.github.com/lorenzocaum/9d514b7eac07df81d602

    Let us know if this works.

    Also, there is a broken image for your theme. You can check through Firebug or Chrome Developer Tools.


    Lorenzo


    Pim Stumpel

    August 13, 2014 at 8:52 am

    Hi again,

    I added the data to my child themes function.php. And it looks like:

    function ee_remove_category_options_from_dropdown() {
    if(is_page(’12’)){
    jQuery(document).ready(function () {
    jQuery(“#ee_filter_cat option:contains(Optimist Lanzarote)”).remove();
    });

    but no changes so far i can see:(

    }
    }
    add_action( ‘wp_footer’, ‘ee_remove_category_options_from_dropdown’ );


    Pim Stumpel

    August 13, 2014 at 8:57 am

    oh WAIT! i made a mistake i think it works!

    cheersss


    Lorenzo Orlando Caum

    • Support Staff

    August 13, 2014 at 9:00 am

    Your site isn’t loading. Are you using this code:

    https://gist.github.com/lorenzocaum/9d514b7eac07df81d602


    Lorenzo


    Pim Stumpel

    August 13, 2014 at 9:14 am

    Ah yeah, could be because i was changing some stuff again, to add extra removing code for the other categories.
    Now all is fine and the website loads.

    So thanks again for the great and quick support!

    cheers

    Viewing 6 reply threads

    The support post ‘Hide some filters in [CUSTOM_EVENT_VIEW}’ is closed to new replies.

    Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

    Event Espresso