Community Forums › Forums › Archived Forums › Design Tips and Tricks › Big No-No to edit functions.php file?
Tagged: footer credits
- This topic has 11 replies, 5 voices, and was last updated 11 years, 1 month ago by lbdesign.
-
AuthorPosts
-
September 12, 2013 at 10:42 pm #62195mkattyMember
I want to change the footer copyright & links, but everything I've read says to add the code, which I have, to the functions.php file, which, when opened, it says how I should NOT edit file under any circumstances. *warning warning*
The Genesis Simple Edits plugin was recommended frequently (I'm using Prose), and maybe this is my problem, but I don't understand what I'm supposed to change in the plugin settings. Besides, I did read something about the plugin being older and not working well... not sure.
So. Do I add anything to the functions.php file? Help - don't want to blow the site up.
๐
http://www.dorothymandrakos.com/blog/
Thanks!
~KittySeptember 12, 2013 at 10:55 pm #62197wpspeakMemberWe did you see the warning? If you use child theme, there's no such warning.
Genesis Simple Edits plugin helps you to add any code to any location using Genesis hooks, depending what you want to add.
So, what exactly are you trying to do?
September 12, 2013 at 11:09 pm #62200mkattyMemberThis is the code from the functions.php file in Prose -
* WARNING: DO NOT edit this file under any circumstances. Please do all PHP modifications via the Custom Code admin menu. */ /** * This file calls the init.php file for both Genesis and Prose. * * It initializes the Genesis framework, and loads the Prose library as well. * * This file is a core Prose file and should not be edited.
I'm trying to change the links in footer to my copyright and website link.
Thanks!
September 13, 2013 at 9:33 am #62275Brad DaltonParticipantYou should add the code in the Genesis Custom Code box for PHP however you can add PHP code at the end of the prose/lib/structure/custom.php if it doesn't work in the special Custom code box in your dashboard.
The code may also work in the prose/lib/init.php file but its not recommended you add it there.
Another option is to create a plugin for all your custom PHP code which is generally not needed on other child themes where you can use the child themes functions file.
The Genesis Custom Code box for PHP in Prose and a custom PHP plugin are the best options.
September 13, 2013 at 10:08 am #62282mkattyMemberGreat Brad - thanks for replying! I'll give it a whirl.
๐
~KittySeptember 13, 2013 at 11:39 am #62307Brad DaltonParticipantYeah the plugin looks like a good idea for the Prose theme i think.
September 13, 2013 at 3:55 pm #62375mkattyMemberWell, tried the pasting the code for how I'd like the edited footer to be (more-or-less) to the "end of the prose/lib/structure/custom.php" that you mentioned and got an internal error ...
/** Customize the credits */ add_filter( ‘genesis_footer_creds_text’, ‘custom_footer_creds_text’ ); function custom_footer_creds_text() { echo ‘<div class=”creds”><p>’; echo ‘Copyright ยฉ ‘; echo date(‘Y’); echo ‘ ยท <a href="http://www.dorothymandrakos.com/blog/">Dorothy Mandrakos</a> | <a href="http://ink2art.com">Ink2Art Design</a>‘; echo ‘</p></div>’; }
The plugin/download for custom snippets is just a php file... for a plugin??
And lastly, I just can't figure out how to place the info (links, html) into that Genesis Simple Edits plugin... shortcodes etc. Arggghhh. I guess I should stop wasting so much time on one of the (sort of) least important issues on the blog.
๐
Thanks again Brad,
~Kitty
**ok, why are those links weird in the pasted code??September 14, 2013 at 2:10 am #62463Rick AdlamMemberHi mkatty,
I'm new to Genesis, but will this help?
You have simple edits plugin installed.
Delete the short codes there you don't want, and leave the ones you want to keep, like I did here below.
In Simple Edits Go to the:
Footer Credits Text: I left this alone, but you could wipe itFooter output: Check box for Modify Entire Footer Text (including markup)? [check this box make your changes in the text area below it]
This is my practice build site at http://www.mrmortgage.com.au/wordpress/ [So you can check the result]
This is the mix of short codes I left, and the HTML I added, to get rid of Genesis credits and add my own.
"<div class="gototop"><p>[footer_backtotop]</p></div><div class="creds"><p>Copyright [footer_copyright] ยท Mortgage News & Reviews Published By Mr Mortgage ยท [footer_loginout]</p></div>"
Hope this is what you are wanting to achieve.
Rick Adlam
September 14, 2013 at 6:11 am #62475Brad DaltonParticipantAs previously mentioned, its best to use the Custom Code box for custom PHP when using the Prose theme.
The next alternative is to use the plugin which i linked too.
Yes, its a simple PHP file in the plugin where you add your custom PHP code and install. You can edit it from the Plugin > Editor however its best to use FTP with a code editor like Notepad++
When pasting code in the forums, its best to use Pastebin or Github Gists and drop a link here otherwise the coe can cause errors when copying from a webpage into the WordPress theme editor to your functions file.
Otherwise, you can create your HTML links in anew post draft, copy the HTML from your text editor and then paste the HTML into the last box in the Genesis Simple Edits plugin: Modify Entire Footer Text (including markup)?
You could even paste the HTML into the Footer Credits Text field and remove some or all of the shortcodes.
September 14, 2013 at 7:09 am #62493mkattyMemberExcellent - thank you guys. Now I get it regarding the Simple Edits plugin. Makes sense now (I think so anyway). Must try it!
Brad, I always use Notepad++ any time I copy anything. I'm an old NetObjects Fusion user and could break a site with pasting from anywhere else. ๐
Ok, going to try your suggestions.
Thanks Rick, thanks Brad!
~Kitty
September 14, 2013 at 2:18 pm #62566mkattyMemberYay! Was able to make some changes thanks to you guys! Not everything ideal, but it works for me!
Thx again,
๐
~KittyOctober 9, 2013 at 12:47 am #65925lbdesignParticipantThanks for this discussion -- the Genesis Simple Edits plugin really helped me with footer edits.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.