latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

including customer functions

Home Forums Community Forum including customer functions

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 7 months ago.

Topic Author Topic
Posted: Saturday May 25th, 2013 at 2:07 am #50618

I have looked everywhere but the answers are jibberdish for me. So here’s my problem:

For my site I have a range of custom made functions.
They are now at the top of the functions.php from the theme I use.
That means that every time I upgrade the theme I have to add them there again.
Is there a way that I can put these functions in a separate cust_functions.PHP file and include that file with one line in the functions.php?
One line is easier to add and maintain than a whole range of functions…

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Saturday May 25th, 2013 at 8:43 pm #50639

You could add these as a must-use plugin. /wp-content/mu-plugins/

See: Knowledge Base » Hacking s2Member® Via Hooks/Filters

Posted: Sunday May 26th, 2013 at 1:43 am #50650

Right… (sigh) That is as clear as muddy water.
This question had nothing to do with s2 other than that there are quite a few good php coders out here.
I was more thinking about adding one line to my theme functions.php to make the functions I created available. I guess now that there is not such a thing so I will have to keep merging my own functions into the functions.php. (sigh, talking about efficiency)

In VFP there was a command like: “Set procedure to ABC additive” adding all kind of function containing programs into one file… again… those were the good old productive days… Now I have to deal with php…

Posted: Sunday May 26th, 2013 at 2:35 am #50651

Try adding your functions to a PHP file named whatever you want, and put the file in the /wp-content/mu-plugins/ directory, they’ll be loaded by WordPress without you doing anything else. http://codex.wordpress.org/Must_Use_Plugins

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.