• Hi – i can’t seem to remove the big header image from the pages i want it removed on. Can you please help?

Viewing 15 replies - 16 through 30 (of 61 total)
  • Saiqua hi
    you just remove the image from all pages but remains in home page? is it your whole meant?

    can you share your website url for me?

    Thread Starter Saiqua

    (@saiqua)

    hey my page is not public yet. it’s a bit difficult to send the url at the moment because i’m redoing a website and uploading it would replace it completely.

    but yes you got it. i want it removed in all pages BUT the home page.

    ok it ‘s a bit difficult , I think you are a very clever man,If you’re ready say me to begin the project ok?

    First creat a php file in your theme folder next to the index.php file
    I name It template.php
    add this code to it

    <?php
    /*
    template name:other page
    */
    get_header();
    get_footer();
    ?>

    then go to the admin panel and add a page
    In the page option a drop down option has just added to your page option
    It has named template
    you can change the template ot the page you want
    in this case we should create a template for other page except home page
    In step 2 we should customize header to remove header image
    we can use child theme the best way to reach this goal . got it?

    I changed the above code to this now

    <?php
    /*
    template name:other page
    */
    get_header();
    ?>
    
    <div class="info">
    	 <?php
    	if(have_posts())
    	{
    	        the_post();
    	        the_title('<h3>','</h3>');
    	        the_content();
    	}
    	else
    	 echo"there isn't such page";
    	?>
    </div>
    
    <?php
    get_footer();
    ?>

    It needs some changes to complete .I am working it now

    Thread Starter Saiqua

    (@saiqua)

    sorry but i had to say this – i’m not a man ??

    Thread Starter Saiqua

    (@saiqua)

    let me look through this carefully and get back to you though. thanks!

    excuse me , please be careful and read the text and do it carefully
    as I complete the topic,it would be hard to understand!

    Thread Starter Saiqua

    (@saiqua)

    ok So far so good. I think I got everything you mentioned here.

    Correct me if i am wrong in my understanding..

    1. We created the template.php file for “other page” because this will be the template that these pages will follow which is different from the default template of the theme.
    2. Don’t we have to create another header.php file in that case? Right now it’s summoning the same header file that includes the header image. Don’t we have to make one without the image now?

    it’s OK ,you are so clever.you got it all.
    step2 we should do the things in best way not in way we can.
    we should create a child theme to remain our changes forever ,by the way updating the theme shouldn’t remove our changes
    OK?

    Thread Starter Saiqua

    (@saiqua)

    i’m already working on a child theme. i added the new template file in the child theme. i figured if i placed that in the original theme folder, it can get erased with an update.

    OK,I created a child theme folder named it Ving-child
    in this folder we should have 3 file
    1-screenshot.png
    2-style.css
    3-functions.php
    style.css cotains these

    /*
    Theme Name: ving child
    Theme URI: https://www.divjot.co/blog/2016/02/18/ving-wordpress-theme/
    Author: Divjot Singh
    Author URI: https://www.divjot.co
     Template:  ving
    Description: ving Child Theme
    Version: 1.5
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    */

    In funcions.php put this code

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    ?>

    got it?

    Activate your child theme , then we can do some changes in child theme

    Move the template.php file we have just created previously
    into child theme and test it work with creating a page using this template

Viewing 15 replies - 16 through 30 (of 61 total)
  • The topic ‘Customizing header image’ is closed to new replies.