Community Forums › Forums › Archived Forums › General Discussion › Edit Footer Text in Genesis Sample child theme
- This topic has 11 replies, 2 voices, and was last updated 10 years ago by mild0d.
-
AuthorPosts
-
April 8, 2014 at 2:07 pm #99116mild0dMember
I Am going through and customizing the genesis sample child theme. I am all the way down to the foooter and I am having trouble finding what is spitting out the footer code. If you look @ the sample child theme it says this in the footer:
Copyright © 2014 · Genesis Sample Theme on Genesis Framework · WordPress · Log in
I want to change the text and ad some other styles such as making it full width.
April 8, 2014 at 2:20 pm #99122nutsandboltsMember*shameless self-promotion* You could always install the Genesis Custom Footer plugin: http://wordpress.org/plugins/genesis-custom-footer/
The Simple Edits plugin has a spot to edit the footer text as well.
If you don't want to use a plugin, you can use these instructions for editing the footer credits: http://my.studiopress.com/snippets/footer/
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+April 8, 2014 at 2:27 pm #99125mild0dMemberOnce again thank you! If I would have scrolled down a little further i would have seen that.
April 8, 2014 at 2:32 pm #99129mild0dMemberSorry, But you give me an explanation of what the following code does:
//* Reposition the footer remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); add_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); add_action( 'genesis_after', 'genesis_do_footer', 12 ); add_action( 'genesis_after', 'genesis_footer_markup_close', 13 );
I am confused as to what the numbers at the end are doing.
April 8, 2014 at 2:34 pm #99131nutsandboltsMemberThat particular function lets you move the footer. The numbers are giving the function priority - a smaller number means higher priority. So if you have two functions acting on the same hook, the one with the lowest number will display first.
In this case, since you're looking to change the footer credits, you'll want this function instead:
//* Customize the credits add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); function sp_footer_creds_text() { echo '<div class="creds"><p>'; echo 'Copyright © '; echo date('Y'); echo ' · <a href="http://mydomain.com">My Custom Link</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>'; echo '</p></div>'; }
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+April 8, 2014 at 2:52 pm #99166mild0dMemberI promise this will be my last question for the day. This is starting to become less fuzzy.
I am not sure if this is correct, but could I do something like this to make my own genesis_footer_markup_open and close functions?
`remove_action('genesis_footer', 'genesis_footer_markup_open', 5);
remove_action('genesis_footer', 'genesis_footer_markup_close', 15);
add_action('genesis_footer','genesis_footer_custom_open', 5)
function genesis_footer_custom_open() {**Custom stuff here*****
}`
April 8, 2014 at 2:59 pm #99169nutsandboltsMemberI'm a little confused about what you're trying to accomplish... The footer markup open/close functions simply tell the footer div to open and close. I guess it's possible to add something custom in there, but it's generally much easier to use the function I gave you above if you just need to customize the credits. You can add anything you want to that function as long as it's in the same format as the example.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+April 8, 2014 at 3:17 pm #99180mild0dMemberSorry for the confusion,
I am trying to either add a additional div class or an id to do some custom styling on some elements I am having trouble with. All that is showing up now is a class on the footer element called "site-footer" I want to add an ID called "footer1" or something like that..
There may be an easier way to do that, i am just unsure at this point.
April 8, 2014 at 3:19 pm #99182nutsandboltsMemberCan you be more specific? I'm trying to visualize what you're doing but I'm not sure what you're adding and where you need it to display on the screen.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+April 8, 2014 at 6:35 pm #99237mild0dMemberIm really sorry I wasnt very clear and thanks for all the help so far.
So as of right now I am guesing that the default footer code is being generated from the parent theme since I have not specified anything yet. which is:
<footer class="site-footer" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo"> <div class="wrap"> <p> © Copyright 2012 <a href="http://mydomain.com/"> My Domain </a> · All Rights Reserved · Powered by <a href="http://wordpress.org/"> WordPress </a> · <a href="http://mydomain.com/wp-admin"> Admin </a> </p> </div> </footer>
What I am am trying to do is make my own custom functions for the genesis_footer_markup_open and close. I am doing this so I can generate some extra classes and IDs on the footer element. Is this the correct way to do it? I don't want to just modify the <p> element. I want to pretty much generate my own footer element using a custom function.
There is probably an easier way to do this but I am still learning how this framework works.
Thanks for your patience with me!, I am probably making this more confusing than it actually is.
April 8, 2014 at 6:39 pm #99238nutsandboltsMemberYou can do that with the function I gave you before. For example, you can do something like this:
//* Customize the credits add_filter( 'genesis_footer_creds_text', 'sp_footer_creds_text' ); function sp_footer_creds_text() { echo '<div class="my-custom-div"><h2>'; echo 'Blah blah blah custom div heading'; echo '</h2></div>'; echo '<div class="creds"><p>'; echo 'Copyright © '; echo date('Y'); echo ' · <a href="http://mydomain.com">My Custom Link</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>'; echo '</p></div>'; }
I hope that makes sense. You can alter this to add any divs you want in any order you want. Just be careful with the quotation marks and semicolons, and be sure you have access to functions.php via FTP in case something breaks your dashboard.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+April 9, 2014 at 7:32 am #99331mild0dMemberThanks for all your help, not only did you help me figure out my problem but my understanding of how genesis works has greatly improved!
This is what I came up with that worked for me.
I have that extra closing div at the beginning to break me out of the site container.
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); add_action( 'genesis_footer', 'genesis_footer_c'); function genesis_footer_c() { echo '</div><div class="myfooter">'; echo 'This is my Footer'; echo '</div>'; }
-
AuthorPosts
- The topic ‘Edit Footer Text in Genesis Sample child theme’ is closed to new replies.