Genesis removing the breadcrumbs on events page list and on single event page

Home › Forums › Calendar Products › Events Calendar PRO › Genesis removing the breadcrumbs on events page list and on single event page

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #68645
    tkbmtl
    Participant

    Hi,
    I’m trying to remove the breadcrumbs and other stuff. I’m using GENESIS and a child theme. I put this code in my functions.php but it’s not working.

    if ( tribe_is_event() ) {
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );
    remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );
    remove_action(‘genesis_before_loop’, ‘genesis_do_breadcrumbs’);
    }

    if I put the ! before the tribe_is_event its working but it remove it from all page. I have try the get_post_type and its not working…

    Thank you for your help.

    #69141
    Leah
    Member

    Hi tkbmtl,

    I apologize for the delayed response here. We’ll be happy to try and help out here. I myself am not savvy enough to help with this, but a more Genesis-savvy support member will be here to give you a more substantial reply. Thank you for your patience.

    Best,
    Leah

    #69363
    Barry
    Member

    Hi tkbmtl –

    Can you confirm if you are trying to target all event pages, or just single event pages, or some other combination?

    Thanks!

    #69379
    tkbmtl
    Participant

    Hi,
    Yes I want to target all event pages. I tried all conditional I could find and nothing as worked. Finally I target the URL directly in PHP. Like this :

    add_action(‘genesis_before_content’, ‘remove_some_stuff’);
    function remove_some_stuff(){
    $pageURL = htmlentities($_SERVER[“REQUEST_URI”]);
    if ((strpos($pageURL, ‘events’) || strpos($pageURL, ‘event’) ) !== false) {
    remove_action( ‘genesis_entry_header’, ‘genesis_post_info’, 12 );
    remove_action( ‘genesis_entry_footer’, ‘genesis_post_meta’ );
    remove_action(‘genesis_before_loop’, ‘genesis_do_breadcrumbs’);
    }

    Its working but, it’s not how it’s supposed to work in WordPress, in my opinion.
    Thank you.

    #69399
    Barry
    Member

    OK, how about tribe_is_event_query()?

    #69402
    tkbmtl
    Participant

    Ok it worked ! Just by curiosity, if I wanted to do this but only for the main Events List ?
    Thank you.

    #69424
    Barry
    Member

    You could bolster your test by combining the results of conditionals like tribe_is_list_view() – depending of course on what your default view is – and WordPress functions to check if the visitor is viewing an archive and/or a particular taxonomy etc (of course, for some of these we might expect a positive result and others a negative) depending on how finely you want to target the code that follows πŸ™‚

    #73262
    Kelly
    Participant

    Hi, tkbmtl. As it’s been over two weeks since your last reply, I’m going to close this thread. Please open a new one if you choose to pursue this further in the future.

    Thanks for being part of the TEC community! πŸ™‚

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Genesis removing the breadcrumbs on events page list and on single event page’ is closed to new replies.