Move 'Site Name ' & 'Tagline' up the theme page? Via MUplugin

Hi. Hope you are all well?

I am using this theme:-

http://davidakennedy.com/projects/accessible-zen/.

Sadly, (for me!), it places the 'Site Name' and 'Tagline' above a "Customizable Header Image"!!!

I prefer the 'Site Name' and 'Tagline' to be above the "Customized Header Image"!!!!

My question is; for various reasons; please?:-

Can they be 'swapped over' via a piece of 'Must Use Plugin' code.

And if so, does anyone have a relevant piece of code?

Thanks in advance.

Happy New Year!

Johnv

  • Tyler Postle

    Hey John,

    Hope you're doing well today!

    I'm a little confused by your question here:

    Sadly, (for me!), it places the 'Site Name' and 'Tagline' above a "Customizable Header Image"!!!

    I prefer the 'Site Name' and 'Tagline' to be above the "Customized Header Image"!!!!

    Do you mean that it's currently below the header image and you would like it above it?

    I tested out the theme on my install and it looks like that is what you are wanting here so I've gone ahead and edited the header file to provide this. Instead of an mu-plugin it's better to use a child theme in this case. Then any other edits you need to make you can just make them in the child theme and they will all be safe from theme updates.

    I've bundled the edited header.php into a child theme for you so you can just upload it from your WordPress dashboard via:

    Themes > Add New > Upload.

    Once it's uploaded, activate it on your site and you should see that the header image will be below your site name and tagline now :slight_smile:

    If that isn't what you were wanting just let me know, perhaps I can make another edit for ya.

    Hope you had a happy new year!

    Cheers,
    Tyler

  • Tyler Postle

    Hey John,

    Would it be Ok if I ask the occasional question?

    For sure! You can always create a ticket with us; however, depending how complex the solution is - we may not be able to provide it. We can usually at least point you in the right direction though :slight_smile:

    So I need to learn how you did it, so that I can put these proposed changes into the 'child theme' you created!!!

    I'll show you exactly what I did :slight_smile:

    If you open up the original, header.php file of your theme, you will see this code around line 36:

    <?php if ( get_header_image() ) : ?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
    				<img class="site-logo" src="<?php echo esc_url( get_header_image() ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    			</a>
    		<?php endif; ?>

    You wanted to move that down below the title and description(tagline). So I found the call for the description which is:

    <?php bloginfo( 'description' ); ?>

    Then cut and pasted the header image block below that.

    If you compare the two header.php's you will see the difference there.

    I'll admit that I'm not very good with php myself, but just by messing around with templates like this I've learned quite a bit. When you first start messing around with php you will no doubt run into a lot of syntax errors as it's a very picky language when it comes to the code format - one wrong symbol and you will end up with a white screen, but the syntax error will always tell you exactly where the error occurred so you can go back and fix it up.

    Hope that helps! and like I said, if you have other questions on further customizations you can definitely let us know and we'll at least try to point you in the right direction.

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.