homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

Where to put code to change backend
In this case adding buttons to TinyMCE

 6:54 am on Dec 7, 2013 (gmt 0)

I have a function that when hooked up with add_filter, adds a button to TinyMCE.

It works, but the site I got it off suggests putting it in the themes functions.php. This feels wrong. Is there a better place to put this code?



 1:55 pm on Dec 7, 2013 (gmt 0)

The short answer is to use a child theme. Does your current theme support child themes? If so, then you create one and modify it to your heart's desire and it won't undermine the parent theme.



 6:09 pm on Dec 7, 2013 (gmt 0)

I am not using an existing theme - doing one for the site. My problem was not with modifying the theme, but with backend functionality in a file in the theme folder.

I have not used Wordpress for a while, and its probably just that the approach is different from what I am used to.



 9:34 pm on Dec 7, 2013 (gmt 0)

You could make it a mini plugin. I usually leave layout related stuff in the theme and anything specific to the site that's not layout in a plugin for that site. The advantage there is that if you change themes the functionality doesn't go away.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved