Adding code to the functions file

I would like to add this code (http://digwp.com/2010/06/shortcode-for-includes/) to my functions file.

My question is this though. I'm working on a child theme and I don't have my functions file in my child theme folder.

Do I need to add the functions file to the child theme folder. Or, do I add it the original location.

If adding it to me child theme folder, how do I add the file to that (lol!).

AND, either way, which folder contains the functions file (lol again).

Lastly, does anyone understand those instructions. Is it saying:
Create a "page" for the code/content you want added to several page. Then, create a shortcode that calls that content/code into whatever page the shortcode is used?

http://digwp.com/2010/06/shortcode-for-includes/

  • aecnu

    Greetings annasusmiles,

    Thank you for the questions.

    My question is this though. I'm working on a child theme and I don't have my functions file in my child theme folder.

    You would want to copy it over to the child theme folder and modify it there.

    Do I need to add the functions file to the child theme folder. Or, do I add it the original location.

    You would want to add it as mentioned above to a copied to the child theme file. You may add it directly to the file in the parent folder and it work until the theme updates.

    Having it in the child folder insures its survival in the event of an update.

    I did check the post you pointed out which I admit I have no idea about - but it is also three years old and I have no idea if it is relevant still or not.

    In addition, with a little bit of digging I found that as recently as the end of last year plugins such as WP Advanced Include plugin and several others all perform this function it appears.

    Let me know how it goes if you try one of them out.

    Thank you for being a WPMU DEV Community Member and have a GREAT week ahead.

    Cheers, Joe

  • annasusmiles

    Thanks so much @aecnu.

    In the hour since I made that post, I decided I want to use the custompress plugin to do this. I don't want to use plugins. So many of them are WAY to buggie. The one I have now for example doesn't work half the time.

    I am having trouble setting this up with the custompress plugin but I think I'll start another thread about it.

    Thanks for your suggestions though. If I can't figure it out, I'll definitely give those a whirl.

    :slight_smile:

  • aecnu

    Greetings Susanna,

    Thank you for the input and I am aware that many folks think that plugins are buggy etc.

    But there is a mountain of them that have followed the golden rules of having a smoother development experience.

    #1 Rule: Have a WordPress centered host who configures the servers to perform with WordPress and meets the needs of this resource hungry CMS platform.

    #2 Rule: Do not use Framework things unless you are well versed in coding and ready to integrate the plugins into the framework itself.

    This last point is the biggest one I do not understand - it is obvious the seller claims Framework theme - the word framework in itself indicates a barrier.

    Hopefully these tips will make your future WordPress based installations develop much smoother - actually following those two primary rules sets a great foundation for the WordPress empire builder.

    Thank you for being a WPMU DEV Community Member!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.