Put a banner above or below the slider
-
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
Did you forget the closing
"aftercolor:white;?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’);}
?>
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
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.

