WordPress.org

Ready to get started?Download WordPress

Forums

creating a function-php (17 posts)

  1. apolyram
    Member
    Posted 1 year ago #

    I'm new at this and I need to create a new function.php but I can't find where to start. No "add new" or "save as". I went to Appearances>Editor but there is no where to create a new function.php? I have the content of what I need to put in but Where do I start?

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    Is this for a child theme?

  3. apolyram
    Member
    Posted 1 year ago #

    Yes. I've got the content of the code that should be written in there but I don't know where to get started. Where do I go to create the function.php? I don't see anything in my Dashboard

  4. keesiemeijer
    moderator
    Posted 1 year ago #

    If your (child) theme hasn't got a functions.php you can create it with a text editor and upload it by using FTP.

    As the functions.php file behaves as a plugin file you could also create a plugin with this plugin and put the code in there: http://wordpress.org/extend/plugins/pluginception/

    http://codex.wordpress.org/Functions_File_Explained

  5. apolyram
    Member
    Posted 1 year ago #

    Text editor? Like Word?

  6. keesiemeijer
    moderator
    Posted 1 year ago #

    Do the editing with an acceptable text editor (not Word):
    http://codex.wordpress.org/Editing_Files#Using_Text_Editors
    free for Windows: Notepad++
    free for Mac: TextWrangler

  7. apolyram
    Member
    Posted 1 year ago #

    OK. thanks. As you can see I'm really new at this.

  8. keesiemeijer
    moderator
    Posted 1 year ago #

    No problem. What is it exactly you want to do (in functions.php)?

  9. apolyram
    Member
    Posted 1 year ago #

    I want to add widgets to the footer

  10. keesiemeijer
    moderator
    Posted 1 year ago #

    Have you ever used an FTP client or the file management application your host provides (cPanel)?

  11. apolyram
    Member
    Posted 1 year ago #

    I set up a free account with Filezilla, but I haven't really used it yet except to copy over some of the .php's from the main Theme, the ones I wanted to change. I basically dragged them over from my desktop (I had a copy of the main theme on my desktop)to the wp-content folder. So I'm guessing that if I create a functions.php in Notepad I'll do the same thing? Is that right?

  12. keesiemeijer
    moderator
    Posted 1 year ago #

    So I'm guessing that if I create a functions.php in Notepad I'll do the same thing? Is that right?

    that's right, copy it to your theme folder. Make sure your functions.php start and end with php tags:

    <?php
    // your code
    ?>

    What theme are you using?

  13. apolyram
    Member
    Posted 1 year ago #

    I'm using the Responsive Theme

  14. keesiemeijer
    moderator
    Posted 1 year ago #

    That heme has a functions.php. If you are using a child theme create and upload (FTP) a new functions.php to your child theme's directory with only the footer widgets code in it inside php tags:

    <?php
    // your widgets code
    ?>
  15. apolyram
    Member
    Posted 1 year ago #

    OK thanks. Now at least I've learned both things.

  16. Andrew Bartel
    Member
    Posted 1 year ago #

    Check out notepad++ for editing as keesie suggested, it'll be a whole lot easier than regular notepad.

  17. apolyram
    Member
    Posted 1 year ago #

    Right. thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.