Support » Plugin: Custom Header Images » display page title inside chi_display_header div

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey buddy,

    I’ve been looking around for support on how to add text inside of the image, and couldn’t find anything. But I managed to do it myself by;

    Going into Installed Plugins, and and find the Custom Headers plugin, and click ‘Edit’. In the block of code do a CTRL+F to find this line: background-image:url

    After that code, you will see a closing </div> tag. Remove that tag (or comment it out).

    Now, go to your page.php, and where you have this line:
    <?php if(function_exists('chi_display_header')) { chi_display_header(); } ?>

    ADD that closing </div> tag that you removed to the end of it.

    Now you can place your ‘the_title()’ hook, or anything in between the closing tag and the code, like so:

    <?php if(function_exists('chi_display_header')) { chi_display_header(); } ?>
    
    <h1 class="entry-title"><?php the_title(); ?></h1>
    
    </div>

    Sorry, that post is littered with spelling errors, I was in a rush and had to write in in about 4 seconds. Hopefully you get the idea anyway!

    Sorry, that post is littered with spelling errors, I was in a rush and had to write in in about 4 seconds. Hopefully you get the idea anyway!

    Thanks for your reply !

    actualy, I managed to make it work another way by using the <?php chi_get_header_image_url() ?> hook.

    I don’t realy like inserting css directly in the html but… oh well, it works :
    <div id="header_image" style="background: url(<?php if (function_exists('chi_get_header_image_url')) echo chi_get_header_image_url(); ?>)"><h1><?php the_title(); ?></h1></div>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘display page title inside chi_display_header div’ is closed to new replies.