• Ypanesa

    (@ypanesa)


    I cannot figure out, how the settings have to be, to get the subtitle underneath the title. I think, title and subtitle should be more ore less together because they depend on each other. That’s why I would prefer to have the subtitle always directly under the title. Floting left, right or both centered.

    I would guess, that when I set the “logo/title” in the headersettings to the left, the title would be on the left side with the subtitle also left right unter the title. When I set the “logo/title” centered, title and subtitle should be both centered and when I set it to right, both should be floating right. But that’s not the case.

    When I set it to the left, the title is shown on the left, the subtitle is shown on the right side.
    When I set it centered, the title is centered and the subtitle is more to the right side, but not completely.
    When I set it to right, the title is on the right and the subtitle directly left from the title. I let it like this for the moment.

    Does the theme wants it like that? Is there a workaround?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Menaka S.

    (@menakas)

    Hi,
    Try adding this to your child theme’s functions.php if your logo is on the left and you want the tagline below it.

    
    add_action('wp_head', 'move_tagline_below_logo');
    function move_tagline_below_logo(){
    
      if ( ! method_exists('CZR_header_main', 'czr_fn_tagline_display') )
        return; 
      remove_action('__navbar', array(CZR_header_main::$instance, 'czr_fn_tagline_display'), is_rtl() ? 10 : 20 );
      add_action('__after_logo', array(CZR_header_main::$instance, 'czr_fn_tagline_display') );
    
      add_filter('tc_tagline_class', 'span7_to_12');
      function span7_to_12( $_class){
        return str_replace('span7', 'span12', $_class);
      }  
    } 
    Thread Starter Ypanesa

    (@ypanesa)

    Thanks Menaka. It works fine.

    It seems that subtitle and navigation cannot be on the same line, which would be perfekt.

    Is it possible, to have the subtitle directly under the title and the navigation one line below?

    Have a look here: https://bikeaway.info/

    Menaka S.

    (@menakas)

    Hi,
    Have you added the code I gave? Currently, The subtitle appears to the left of the title.

    Thread Starter Ypanesa

    (@ypanesa)

    Yes, the subtitle appears under the title. But there is one line between the title and the subtitle. I would prefer to have them right one below the other. The horizontal menu could then be one line further down.

    It’s quite difficult to explain. Do you understand, what I mean?

    Menaka S.

    (@menakas)

    Hi,
    I am sorry. I don’t see the subtitle under the title. This is what I see.
    https://imgur.com/a/UCKhE

    Thread Starter Ypanesa

    (@ypanesa)

    Try again, meanwhile I cleared the cache. It should look like this: https://imgur.com/a/f5gyS

    Menaka S.

    (@menakas)

    Hi,
    The subtitle’s top margin is set to 25px. Try reducing it.

    .navbar h2  {
     margin-top: 10px;//ADJUST
    }
    Thread Starter Ypanesa

    (@ypanesa)

    navbar h2 did not work. I tried

    .site-description {
    	margin-top: 0px;
    }

    That worked. But after closing the child-themes settings, I went back to the child-themes CSS settings and this code has gone. I cannot see it anymore. But it is still working. Strange. Because I would like to change it. I think, I should include the margin-top to h2.site-description. What do you think?

    Thread Starter Ypanesa

    (@ypanesa)

    Could you please help me with https://android-hilfe.info as well. It’s the same problem. But the same code won’t work. I tried it first over the settings menue for the theme, then with the CSS

    .navbar-wrapper .navbar .site-description {
    	float: left;
    	padding-right: 5px;
    	text-align: left;
    }

    but it’s not working.

    I want to have the subtitle directly under the site title.

    Menaka S.

    (@menakas)

    Hi,
    Yes. You can set it to h2.site-description

    Thread Starter Ypanesa

    (@ypanesa)

    Could you please help me with my other site? My question is just above your last answer. I try and try and try. No way to get the subtitle under the title.
    https://android-hilfe.info/

    Menaka S.

    (@menakas)

    Hi,
    Take a look at this code snippet.
    https://gist.github.com/eri-trabiccolo/a91322d0b3a535293a40
    You will have to make appropriate changes to the function/method prefixes as per the new release notes here: https://presscustomizr.com/customizr-pro-v1-2-30-customizr-free-v3-4-30-release-note/

    Thread Starter Ypanesa

    (@ypanesa)

    It seem I’m doing something wrong, because it is not working. I added the following code to the functions.php of my child-theme:

    add_action('wp_head', 'move_tagline_below_logo');
    function move_tagline_below_logo(){
      if ( ! method_exists('CZR_header_main', 'czr_fn_tagline_display') )
        return;
        
      remove_action('__navbar', array(CZR_header_main::$instance, 'czr_fn_tagline_display'), is_rtl() ? 10 : 20 );
      add_action('__after_logo', array(TC_header_main::$instance, 'czr_fn_tagline_display') );
    
      add_filter('czr_fn_tagline_class', 'span7_to_12');
      function span7_to_12( $_class){
        return str_replace('span7', 'span12', $_class);
      }  
    }

    Then I added this code to the style.css of my child-theme:

    /* Tagline below the logo */
    
    .inside.site-description { margin-left: 0 }
    @media (max-width: 979px) {   
      .inside.site-description {
        display: none;
      }
    }
    Menaka S.

    (@menakas)

    Hi,
    Change this line
    add_action('__after_logo', array(TC_header_main::$instance, 'czr_fn_tagline_display') );

    to

    add_action('__after_logo', array(CZR_header_main::$instance, 'czr_fn_tagline_display') );

    Thread Starter Ypanesa

    (@ypanesa)

    It’s not working. I added this code to the functions.php

    add_action('wp_head', 'move_tagline_below_logo');
    function move_tagline_below_logo(){
      if ( ! method_exists('CZR_header_main', 'czr_fn_tagline_display') )
        return;
        
      remove_action('__navbar', array(CZR_header_main::$instance, 'czr_fn_tagline_display'), is_rtl() ? 10 : 20 );
      add_action('__after_logo', array(CZR_header_main::$instance, 'czr_fn_tagline_display') );
    
      add_filter('czr_fn_tagline_class', 'span7_to_12');
      function span7_to_12( $_class){
        return str_replace('span7', 'span12', $_class);
      }  
    }

    When I refresh the site, it shows for a very short moment the code above.

    View post on imgur.com

    Just found out: This code is also shown in the backend. There seems to be some elements missing. Couldn’t find out so far.

    • This reply was modified 8 years ago by Ypanesa. Reason: A minute later
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Title and subtitle position’ is closed to new replies.