This topic has 15 replies, 2 voices, and was last updated 9 years by sharmstr.

  • Author
  • #93790
     igor7137
    Participant

    How do I remove the title page of h1 and leave only h2?

    #93791
     igor7137
    Participant

    screenshot

    Attachments:
    You must be logged in to view attached files.
    #93847
     sharmstr
    Moderator

    That shouldnt be there. Did you add it?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93849
     igor7137
    Participant

    Yes.
    I need to get the title was h2, rather than h1.

    Attachments:
    You must be logged in to view attached files.
    #93851
     sharmstr
    Moderator

    Can I ask why you want to have an H2 instead of H1? You’d have to change and maintain code to do what you want. If its a styling issue, you can easily make the h1 title look like h2. I’m not trying to be difficult, just trying to offer a better solution, but need to understand why you want to do it.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93853
     igor7137
    Participant

    For search engines.
    How can I change the code?

    #93858
     sharmstr
    Moderator

    Put this in your child theme’s functions.php file

    COPY CODE
    
    function kleo_title_main_content() {
            if (sq_option('title_location', 'breadcrumb') == 'main') {
    
                $title_status = true;
                if( is_singular() && get_cfield( 'title_checkbox' ) == 1 ) {
                    $title_status = false;
                }
    
                if ( $title_status ) {
                    if ( (is_singular() ) && get_cfield( 'custom_title' ) && get_cfield( 'custom_title' ) != ''  ) {
                        $title = get_cfield( 'custom_title' );
                    } else {
                        $title = kleo_title();
                    }
    
                    echo '<div class="container">';
                    echo '<h2 class="page-title">' . $title . '</h2>';
                    echo '</div>';
                }
    
            }
        }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93867
     igor7137
    Participant

    I have now is not a subsidiary subject, and the parent, and there is this code.

    #93870
     sharmstr
    Moderator

    I dont understand what you mean.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93872
     sharmstr
    Moderator

    The code I gave to will change the h1 to h2. If you want to remove the h1 completely, just delete that part of the script. Delete

    COPY CODE
    
     echo '<h2 class="page-title">' . $title . '</h2>';
    

    I hope that’s what you mean.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93876
     igor7137
    Participant

    I already have the code.
    It removed echo ‘<h2 class=”page-title”>’ . $title . ‘</h2>’; , to no avail.

    Attachments:
    You must be logged in to view attached files.
    #93879
     sharmstr
    Moderator

    I still see it in your code.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93883
     igor7137
    Participant

    That is now removed.

    Attachments:
    You must be logged in to view attached files.
    #93890
     sharmstr
    Moderator

    Ahhh, sorry. That code was for the title if it was in the main section. I dont see a way to override the h1 so it will be upgrade safe, but the h1 tag is in /lib/theme-functions.php around line 349

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #93894
     igor7137
    Participant

    I’ve done everything. Thank you very much! 🙂

    Attachments:
    You must be logged in to view attached files.
    #93898
     sharmstr
    Moderator

    Sorry that it took so long 🙁

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

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

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?