WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] cuztomizr - custom header image (10 posts)

  1. quickbuck
    Member
    Posted 8 months ago #

    I would like to change header in customizr theme, i.e. put an image in the place wher logo, menus and tagline are.

    What should I do?

  2. nikeo
    Member
    Theme Author

    Posted 8 months ago #

    Hi, you might want to check this snippet to adjust your image backgrounds in Customizr.
    Thanks for using the theme

  3. quickbuck
    Member
    Posted 8 months ago #

    thanks for your help!
    I used the snippet for header, but the image is shown in he background (behind tagline and menus)and I what it to replace logo and menus, i.e. I want an image on the top of my site instead of logo etc.

    Is there anything I can do? It is really important for me

  4. quickbuck
    Member
    Posted 8 months ago #

    Or maybe there is a way to delete the header?

  5. nikeo
    Member
    Theme Author

    Posted 8 months ago #

    OK, then I would recommend to unhook all actions on the '__header' hook with

    remove_all_actions('__header');

    And then create your custom actions to add what you want, for example :

    add_action ('__header', 'my_custom_header_content');
    function my_custom_header_content () {
    ?>
    <img src="YOUR IMAGE URL" alt="YOUR ALT" />
    <?php
    }

    Hope this helps

  6. quickbuck
    Member
    Posted 8 months ago #

    Thanks for your response.
    I'm sorry, but I'm not very good at IT.
    I understand that I have to go in Appearances-> Editor -> Header.
    There, I see some code and I guess I have to put remove_all_actions('__header'); there. But I don't know where exactly...

    That's what I see:

    <?php
    /**
     * The Header for Customizr.
     *
     * Displays all of the <head> section and everything up till <div id="main-wrapper">
     *
     * @package Customizr
     * @since Customizr 1.0
     */
    ?>
    <!DOCTYPE html>
    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8)  ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->
    <?php tc__f('rec' , __FILE__ , __FUNCTION__ ); ?>
    
    	<?php do_action( '__before_body' ); ?>
    
    	<body <?php body_class(); ?> itemscope itemtype="http://schema.org/WebPage">
    
    		<?php do_action( '__before_header' ); ?>
    
    	   	<header class="tc-header clearfix row-fluid" role="banner">
    
    			<?php do_action( '__header' ); ?>
    
    		</header>
    
    		<?php
    		 //This hook is filtered with the slider
    		do_action ( '__after_header' )
    		?>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Could you tell me where should I put the code you gave me.
    I really appreciate your help.

  7. tomaja
    Member
    Posted 8 months ago #

    Hi @quickbuck you need to create Customizr child theme. After that you will adjust and place the above code to child`s theme functions.php file. Here is how you can create child theme, its quite easy.

  8. quickbuck
    Member
    Posted 8 months ago #

    It worked! Thanks again for your help. I hope, soon I will make some money thanks to my website and I will be able do donate.

  9. 2touristes
    Member
    Posted 2 months ago #

    Hi all,

    I'd would like also add an image in the header of my site, but it's not working for me...

    I try this but nothing change...

    Hope you could help me!

    remove_all_actions('__header');
    add_action ('__header', 'my_custom_header_content');
    function my_custom_header_content () {
    ?>
    <img src="http://2touristes.fr/wp-content/uploads/2014/05/P1070009.jpg" />
    <?php
    }

  10. rdellconsulting
    Member
    Posted 2 months ago #

    Can you start a new thread as this one is marked [resolved] and is an old post.

Reply

You must log in to post.

About this Theme

About this Topic