Community Forums › Forums › Archived Forums › Design Tips and Tricks › how to add footer to blog page
Tagged: blog page, footer, Wintersong
- This topic has 12 replies, 3 voices, and was last updated 8 years, 9 months ago by cxp073.
-
AuthorPosts
-
June 24, 2015 at 1:42 am #157374cxp073Member
Good day!
I am a beginner to genesis, so please bear with me!
I am using the Wintersong theme, and would like to add some small footer text to the bottom of my blog page. This footer text needs to appear after the last blog post, so not on the bottom of the sidebar where the menu / site logo is located.
How can I do this? Please be specific as I am still learning about coding / CSS etc.
Thanks!
http://grizzlybearloveskolsch.comJune 24, 2015 at 1:52 am #157375Brad DaltonParticipantYou can add a new widget area http://my.studiopress.com/tutorials/register-widget-area/
And use a hook after the loop http://wpsites.net/genesis-hooks/
Like
genesis_after_loop or genesis_after_content
June 24, 2015 at 8:26 am #157393cxp073MemberHi Brad
Thanks for getting back to me.
That makes a little sense.. I checked the tutorial, and it seems like this is aimed at adding the widget after individual posts. I want this to display on the front page of my blog - under the "next page" button.
Sorry if I'm being daft, but as I said I'm a bit of a beginner.
Could you clarify what I need to do?
Thanks!
June 24, 2015 at 8:30 am #157394Brad DaltonParticipantDid you add the code from the above link for a new widget?
change this line
if ( is_singular( 'post' ) )
to this:
if ( is_front-page( ) )
And change the hook.
June 24, 2015 at 8:36 am #157395cxp073MemberApologies Brad
What you said was clear, But like I said I'm but of a beginner.
Let me read through the tutorials again and give it a go on my test site.
I'll get back to ya!
Best
Cameron
June 24, 2015 at 8:42 am #157398cxp073MemberWhere it says 'themename' in the add widget area tutorial, do I actually need to change this to 'wintersong'?
June 24, 2015 at 8:51 am #157399Brad DaltonParticipantJune 24, 2015 at 10:14 am #157409PhillipDewsBloggerMemberHi CXP073,
If you really want to get your feet dirty and get into come coding then Download your child theme via FTP and open up your functions.php file from the child theme you are using into a text editor. Notepadd++ is a good one and FREE to download.
Towards the botton of that file you should see some code realted to the footer things like remove_action ('genesis_footer')
After those lines of code and before the
<?php
}you can add something like this as I have done on one of my clients sites....
//* Customise the site footer add_action('genesis_footer', 'bg_custom_footer'); function bg_custom_footer() { ?> <div class="site-footer"><div class="wrap"> <p>Some text here © 2015 | <a href="linktoawebsite.com" target="_blank">A Website Text</a></p> </div></div>
Hope this helps! Remember to make a backup of the file first before adding code like this so that you can upload the original file should you break the theme!
All the best and good luck.
- PhillipJune 24, 2015 at 11:07 am #157418cxp073MemberHey Brad
I've fiddled around with some success.
What I have in the functions file is the following:
//* Register after homepage widget area
genesis_register_sidebar( array(
'id' => 'after-homepage',
'name' => __( 'After Home Page', 'themename' ),
'description' => __( 'This is a widget area that can be placed after the home page', 'themename' ),
) );//* Hook after homepage widget area
add_action( 'genesis_after_content', 'wpsites_after_header' );
function wpsites_after_header() {
echo'This text has been added using the genesis_after_header_hook';
}This is, unsurprisingly, showing "This text has been added using the genesis_after_header_hook" where I want it to show on the site.
What it's not showing is the widget's that I've added in Appearance > Widgets.
I suppose this is because it is being told to echo the text; not the widget 'widgets'.
How can I do this?
Thanks for all your help!
P.S. I am able to put bits and peices together, but if I want to learn more about the php written above, and what it actually means, what sources should I use?
June 24, 2015 at 11:15 am #157419Brad DaltonParticipantPlease use the code from this link http://my.studiopress.com/tutorials/register-widget-area/
June 24, 2015 at 11:18 am #157420cxp073MemberHi Brad
I did that.
It shows the widget in appearance > widgets
What I'm trying to do is show the widget where "This text has been added using the genesis_after_header_hook" now appears...
June 24, 2015 at 11:22 am #157421Brad DaltonParticipantJune 24, 2015 at 11:31 am #157422cxp073MemberI'm not sure if I am not explaining this right..
The text "This text has been added using the genesis_after_header_hook" is showing it where I want it to be.
However, I don't want it to say "This text has been added using the genesis_after_header_hook".
I want it to display the widget contents (the individual widgets) that I have added to the "after homepage widget area".
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.