tkbmtl

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • tkbmtl
    Participant

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

    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.

Viewing 2 posts - 1 through 2 (of 2 total)