Put a banner above or below the slider

  • thajekku

    #349

    Is it possible to put a banner above or below the slider? I would like to put one between my slider and top post. I tried putting one in the functions but I messed my code all up. Where should I add it in??

    Winter Follower Giveaway Tour

    Robert

    #12185

    I would like to do the same. I actually made a functions.php for my child theme with the following code:

    <?php

    function graphene_custom_content(){

    if (is_front_page()) {

    ?>

    <div id=”graphene_custom_content” style=”text-align:center; font-family:Times New Roman; font-size:12pt; color=white;>

    <!– The content goes here –>

    I.M GreNada posts every Sunday on < a href=”http://www.theprovince.com/”>The Province’s< / a> website. To read his new posts each week, go to < a href=”http://communities.canada.com/theprovince/blogs/houseofthedead/default.aspx”>theprovince.com/houseofthedead.< / a>

    </div>

    <?php

    }

    }

    add_action(‘graphene_before_content’, ‘graphene_custom_content’);

    ?>

    However, the only thing that shows up is the final part ‘theprovince.com/house of the dead. What did i do wrong? [of course my anchors were written correctly, they are just edited for this posting]

    Admin

    Syahir Hakim

    #12186

    Did you forget the closing " after color:white; ?

    Marvelous Mommy

    #12187

    OK so if I want to add an image, I should put…

    <?php

    function graphene_custom_content(){

    if (is_front_page()) {

    ?>

    <div id=”graphene_custom_content” style=”text-align:center”;>

    <!– The content goes here –>

    MY CODE HERE

    </div>

    <?php

    }

    add_action(‘graphene_before_content’, ‘graphene_custom_content’);}

    ?>

    Marvelous Mommy

    #12188

    OK just tried that and it didn’t work. Could you help me out?? I’m still not very familiar with PHP. I am currently in school for it….just had my first class today! 🙂

    Admin

    Syahir Hakim

    #12189

    This bit should be outside the closing }, like so:

    <?php
    function graphene_custom_content(){
    if (is_front_page()) {
    ?>

    <div id="graphene_custom_content" style="text-align:center";>
    <!-- The content goes here -->
    MY CODE HERE

    </div>

    <?php
    }
    }
    add_action('graphene_before_content', 'graphene_custom_content');
    ?>

    Note also that using the code above will cause the custom content you put in to be displayed only in the front page. If you want it to appear in all posts and pages, remove the if (is_front_page()) { conditional and one closing }.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.