Viewing 15 replies - 1 through 15 (of 16 total)
  • Theme Author terrathemes

    (@terrathemes)

    Hi,

    if you have set up a child theme you can use this function in the function.php. If you don’t use a child theme, please use a plugin like My Custom Functions. If you modify the meteorite theme files directly, your changes will be lost with the next update.

    /**
     * Site branding
     */
    if ( ! function_exists('meteorite_sitebranding') ):
    function meteorite_sitebranding() {
    	$logo_light = get_theme_mod( 'logo_light', '' );
    	$has_custom_logo = has_custom_logo();
    	
    	if ( $has_custom_logo || $logo_light) {
    		if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
    			the_custom_logo();
    		}
    		if ( $logo_light ) {
    			echo '<a href="' . esc_url( home_url( '/' ) ) . '" title="' . esc_attr(get_bloginfo('name')) . '"><img class="site-logo light" src="' . esc_url($logo_light) . '" alt="' . esc_attr(get_bloginfo('name')) . '" /></a>'; 
    		}
    	} else {
    		echo '<div class="site-brand">';
    		if ( is_front_page() && is_home() ) :
    			echo '<h1 class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></h1>';
    		else :
    			echo '<p class="site-title"><a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo('name', 'display') . '</a></p>';
    		endif;
    		echo '<p class="site-description">' . get_bloginfo('description', 'display') . '</p>';
    		echo '</div>'; // /.site-brand
    	}
    	echo '<p class="custom-logo-text">PLEASE ADD YOUR TEXT HERE</p>':
    }
    endif;

    Please add your own text in the 3rd-last row. Maybe we need to add some styling later on. Let me know if this works for you.

    Thread Starter gokh

    (@gokh)

    I do not use a kids theme. I suppose you say it would be wrong to add to function.php. Can I add the code into Simple Custom CSS and JS?

    Theme Author terrathemes

    (@terrathemes)

    If you don’t use a child theme it would be wrong to paste the code inside the functions.php because it would be lost with the next update.
    You can’t use Simple Custom CSS and JS for this because the code I gave you is PHP. Please use the plugin I linked in my last reply, called My Custom Functions.

    Thread Starter gokh

    (@gokh)

    Theme Author terrathemes

    (@terrathemes)

    Please upload and link the image to a website where I can see the image without downloading anything. Keep in mind I don’t speak turkish and can’t read what’s standing there.

    Thread Starter gokh

    (@gokh)

    There is a problem with the upload sites.
    You can see from this page.

    https://w.tuyograf.com/hizmetler/

    Theme Author terrathemes

    (@terrathemes)

    I made a small mistake in the code. The row where you changed the text must end with a ; and not with a :
    Please change it and test it again.

    Thread Starter gokh

    (@gokh)

    Yes I did. CSS settings (color, position, size) required. Thanks..

    https://w.tuyograf.com/hizmetler/

    Theme Author terrathemes

    (@terrathemes)

    Please remove this code

    p.custom-logo-text {
      float: left !important;
      font-size: 16px;
      color: #ffffff;
    }

    Instead try out this one.

    @media only screen and (min-width: 992px) {
      .logo-container {
        width: 35%;
      }
    }
    @media only screen and (min-width: 480px) {
      .custom-logo-text {
        float: left;
        margin-left: 20px;
      }
    }
    .custom-logo-text {
      color: #fff;
      font-size: 16px;
    }
    Thread Starter gokh

    (@gokh)

    You can see now.

    Theme Author terrathemes

    (@terrathemes)

    I think there’s only one small thing needed. Please remove the code I gave you and replace it with this

    @media only screen and (min-width: 992px) {
      .logo-container {
        width: 35%;
      }
    }
    @media only screen and (min-width: 480px) {
      .custom-logo-text {
        float: left;
        margin-left: 20px;
      }
      .custom-logo-link {
        float: left;
      }
    }
    .custom-logo-text {
      color: #fff;
      font-size: 16px;
    }

    Now the logo has got float: left; too.

    Thread Starter gokh

    (@gokh)

    Yes now OK. Thanks ??

    Theme Author terrathemes

    (@terrathemes)

    You’re welcome.

    Thread Starter gokh

    (@gokh)

    Do “My Custom Function” and “Simple Custom CSS and JS” plugins reduce site performance?

    Theme Author terrathemes

    (@terrathemes)

    This should not be the case. They apply only small pieces of code (that you’re using) to the site.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Adding a text field’ is closed to new replies.