• Resolved pajik

    (@pajik)


    On the home page does not display the page title. Settings: Front page – Static page and Featured Pages – Disabled.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Can you share a link to your site?

    Thread Starter pajik

    (@pajik)

    Only those pages I create, I have it on localhost.
    I look in the html code of the page, so I do not see h1 tag.
    I tried this procedure:
    I try adding my child-theme functions.php

    add_action('__before_loop', 'titles_patch', 0);
    function titles_patch(){
        add_filter('tc_post_formats_with_no_header', 'show_titles_in_non_single');
    }
    function show_titles_in_non_single($post_formats_array){
        remove_filter('tc_post_formats_with_no_header', 'show_titles_in_non_single');
        if ( ! is_single() ){
            return array_diff($post_formats_array,[get_post_format()]);
        }
        return $post_formats_array;
    }
    add_action('__before_content', 'exclude_post_formats_titles', 5);
    function exclude_post_formats_titles(){
        if ( in_array( get_post_format(), apply_filters('tc_post_formats_with_no_header', TC_init::$instance -> post_formats_with_no_header ) ) )
            remove_action('__before_content', array(TC_headings::$instance, 'tc_headings_view'));
        else
            add_action('__before_content', array(TC_headings::$instance, 'tc_headings_view'));
    }

    But it did not work, the title does not show homepage.

    That code, which I think I wrote, was for a specific issue of a (now old) specific customizr version.
    That issue has been fixed months ago.
    I see I cannot see your page but.. what do you mean?
    Do you show a static front page?

    Thread Starter pajik

    (@pajik)

    Yes static front page? Without Featured Pages.

    Ahh,
    yeah the static front page title has never been shown ??
    To do that you should add (and remove the previous now useless code :D) this to your child-theme functions.php:

    add_filter('tc_display_customizr_headings', 'display_home_title');
    function display_home_title( $bool ){
      if ( is_front_page() && 'page' == get_option( 'show_on_front' ) )
        return false;
      return $bool;
    }

    Thread Starter pajik

    (@pajik)

    Thank you very VERY MUCH!
    I need to not display entry-meta, is it possible?

    There’s an option in Content:.. -> Post metas
    Display or not display post metas in home.

    Hope this helps.

    Thread Starter pajik

    (@pajik)

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘No title on homepage’ is closed to new replies.