Support » Theme: Customizr » Remove title on Custom Page

  • Resolved mikeill

    (@mikeill)


    I had been just commenting out the Title on a custom page (child theme -> album-gallery-page.php), but didn’t work after upgrading to the new theme.

    Can I filter it out something like this:

    /*Remove Album Gallery Title*/
    add_filter('wp_title', 'set_page_title');
    function set_page_title($title) {
      if (is_page_template('album-gallery-page.php')) {}
      else
         return $title;
    }

Viewing 6 replies - 1 through 6 (of 6 total)
  • https://codex.wordpress.org/Function_Reference/wp_title
    You want to remove the title.. that one you see on the browser bar?

    mikeill

    (@mikeill)

    No the one displayed on the page. The entry header?

    So wrong filter.
    In this custom template you have something like that: right?

    <?php
    /*
    Template Name: gallery
    */
    ?>
    <?php do_action( '__before_main_wrapper' ); ##hook of the header with get_header ?>

    make it become that:

    <?php
    /*
    Template Name: gallery
    */
    ?>
    <?php
    remove_action('__before_content',array(TC_headings::$instance, 'tc_content_headings'));
    ?>
    <?php do_action( '__before_main_wrapper' ); ##hook of the header with get_header ?>

    Hope it helps.

    mikeill

    (@mikeill)

    Beautiful! I had just discovered that filtering out the_title as opposed to wp_title would do the trick. But your way makes much more sense because it’s specific to the one page. Thank you again.

    Yeah if I have to use a custom template I prefer to put there specific hacks.
    Plus if you remove the action you will skip all the customizr logic to print it..
    (Mind marking this topic as resolved?)

    mikeill

    (@mikeill)

    And then some.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Remove title on Custom Page’ is closed to new replies.