WordPress.org

Ready to get started?Download WordPress

Forums

About Child Themes (29 posts)

  1. tarotmeister
    Member
    Posted 2 years ago #

    I'm trying to create a child theme so I can delete the top menu on my site (Theme 2011). The codex file on that looks to be quite easy, but the first direction is: "Create A Directory"... I don't know and can't seem to find how to do that. Can anybody help? Please???

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    use ftp, or a file manager. From either, you should be able to create a directory on your server. Your host may have a file manager you can sign on to. If not google for how to use ftp. I use filezilla, it's free and works fine.

    -OR-

    Make a new folder on your desktop. That is a directory.

    I usually make the folder, make the style.css file inside it, zip that, and install it as a theme.

  3. tarotmeister
    Member
    Posted 2 years ago #

    Thanks - Do I do that on my dashboard? I no longer use an ftp client. My site is created live on GoDaddy as I go along. I have Filezilla installed but don't know how to use it in this way.

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    Oh, godaddy has a file manager. It's what I use.

    You can creat files and directories from within their manager

    You would logon to godaddy, get to your hosting, head to the file manager and navigate to

    wp-content->themes

    in the themes folder create your child theme directory

  5. tarotmeister
    Member
    Posted 2 years ago #

    OK - I have created the child theme in GoDaddy file manager. How do I put my website into that theme? By the way - thanks very much for the help; you're a lifesaver!

  6. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    Put your website in the theme??

    Sorry... I'm confused by your wording....

    Once you have the theme, if it's created properly, and in the right location, from your WP admin dashboard you should be able to go to appearance -> themes and find and activate your theme

  7. tarotmeister
    Member
    Posted 2 years ago #

    I created the theme by calling GoDaddy and talking to a tech. He walked me through creating the chld theme itself and then told me that he couldn't go any further than that. I still have GoDaddy's ftp client active because I don't know how to save it to where I can use it and I'm afraid I'll lose it if I leave there. So... how do I save it in the right place? Thanks again!

  8. govpatel
    Member
    Posted 2 years ago #

    once you created the directory on server it will be saved as you are working directly on server.

  9. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    @govpatel is exactly correct

    Whether you create files yourself, and upload through ftp

    create files and upload through godaddy's file manager

    or create the folders and files directly on the file manager

    The files are saved, they physically exist on your server

  10. tarotmeister
    Member
    Posted 2 years ago #

    So... As I understand it, when I go to Dashboard-> Appearance-> Themes, my child theme should be there... It isn't; so what did I do wrong? Please have patience--I just haven't ever done this before.

  11. Digital Raindrops
    Member
    Posted 2 years ago #

    Esmi has a Twenty Eleven child theme for download.

    I have a twenty eleven child theme for the dark theme option.

    These are both starter child themes that you can upload from WordPress admin!

    But to practice it might be better to work on a local install, test and then deploy to the server by zipping or with FTP transfer.

    Activating a child theme and making a code mistake can cause login problems on a live test or production server, working local is easy to change and test things first.

    HTH

    David

  12. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    @tarotmeister

    The minimum you should have to do for a child theme to show up is:

    1: navigate to the themes folder in the wp-content folder on your godaddy file manager

    2: inside that folder, twentyeleven and twentyten I believe should already be there. You would make a new folder/directory in the themes folder, alongside the other themes named whatever you want

    3: inside your new folder you would make a new file named style.css with the very basic header elements, and possibly the @import rule if needed

    If you have done those steps, you should have a theme to activate from within the WP dashboard

    as @Digital Raindrops said you could upload one of their basic child themes to get started. And also, activating a broken theme could cause problems, as could messing with a live theme. However now that you are familiar with godaddy's file manager, fixing the problem is as simple as deleting the broken theme.

  13. tarotmeister
    Member
    Posted 2 years ago #

    I went to check out both of these child themes. This stuff is so far over my head I can't reach it even on tiptoes. All I want to do is delete the top menu on my site (and disable the comments after that). I'd even settle for single line spacing if I can't do that. Isn't there an easier way to do that?

  14. Digital Raindrops
    Member
    Posted 2 years ago #

    Ok, you say top menu, 2011 only has one a main menu so we might not be talking about the same theme like this one 'check here'.

    Posts a link to your website with the theme activated so we can help you sort out the menu.

    Regards

    David

  15. tarotmeister
    Member
    Posted 2 years ago #

    Thanks David. Here's the link: http://tarotmeister.com/

  16. Digital Raindrops
    Member
    Posted 2 years ago #

    First thing is do you want a menu that you can manage with no code?

    If you do then:

    1. Go to Admin > Appearance > Menus
    2. Add a new menu and add only the items you want to the menu
    3. Drag the ones you want indented to the right
    4. Save the new menu
    5. You will see a new box Theme Locations
    6. Set the theme location to your new menu and save
    7. View your theme

    Child Theme
    If you then really want the menu gone let us know, as it is the Twenty Eleven theme you will use a child theme, I have to pop out for an hour, I will detail how to do this when I get back.

    Download one of the child themes, install it, activate it and set the background and other settings if required.

    HTH

    David

  17. tarotmeister
    Member
    Posted 2 years ago #

    I do want it gone, but I don't want it to interfere with the sidebar menu. I've created a child theme and I also found the piece of code alchymyth told me (last week) to delete after I had a child theme. I have copied and saved it in case I'm not really working in the child theme and I cause a big error. I should be able to just paste it back in...right? Here's the code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Can I safely remove it?

  18. Digital Raindrops
    Member
    Posted 2 years ago #

    Hi tarotmeister,
    You have the child theme that is great, now we can do this in a couple of minutes.

    Just checked and your child theme is not activated, Admin > Appearance > Themes, find the child theme and activate, it will not affect the content, but you might have to reset the background.

    With your file manager or ftp, download the file header.php from the twenty eleven theme folder, or just download the twenty eleven theme from WordPress extend, to your pc and extract header.php

    Ok, so now we have the twenty eleven header.php file open in notepad or a free syntax text editor like notepad++

    Now we are just going to add a little code to an existing line, find this line, about four from the bottom.
    <?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>

    We are going to add an element to the wp_nav_menu array.

    By default the fallback menu is list pages like on your website, we want to set this to blank so the list pages are not called.

    Default value not seen:
    'fallback_cb' => 'wp_page_menu'
    New added value:
    'fallback_cb' => ''

    So we add this and our line will now look like this:
    <?php wp_nav_menu( array( 'theme_location' => 'primary','fallback_cb' => '' ) ); ?>

    Then save the header.php file, upload this single new file to the child theme's folder and NOT the twenty eleven folder (directory)

    Then check the website!

    Thats it, now when twenty eleven is updated your file is not over written, here is the change see line 118

    Why not just delete that line?

    Can I safely remove it?

    If later we wanted a menu, by editing the line and not deleting it, we can just create a menu as in my post above, assign this to the primary location and it will appear 'like magic' without having to find and replace code.

    All done? mark this as resolved!

    HTH

    David

  19. tarotmeister
    Member
    Posted 2 years ago #

    This looks pretty straight forward. Before I start, though, I want to check one thing with you. The code I downloaded has a lot of instructions mixed in with it. Is that okay? Or am I in the wrong place? Duh.....

  20. Digital Raindrops
    Member
    Posted 2 years ago #

    Hi,
    Click on the 'here is the change' link in the post above, I have uploaded the changed file to pastebin so you can compare it, the file is header.php the line is 118, as in the post above.

    Forget any other code, follow these steps.

    1. Download header.php from twenty eleven
    2. Open the header.php file
    3. Find the line detailed above
    4. Make the change detailed above
    5. Save the header.php file
    6. Upload this to the child theme's folder

    View the change, have a cup of tea and relax, or have a game of cards! lol

    David ;)

  21. tarotmeister
    Member
    Posted 2 years ago #

    A family issue took me away and this is the first chance I have to come back. I just found out that the child theme I thought I had created actually didn't happen, and the GoDaddy tech I just talked to wouldn't help me do it again. I am reviewing what you told me about cteating a child theme and also lookin into changing hosts for one recommended by WordPress. I'll be back as soon as I have done SOMETHING about the child-theme issue. Again, thank you so much for your help and patience. Gary

  22. carlacuomo
    Member
    Posted 2 years ago #

    Hi everyone
    I am working with twenty ten theme which ue to be the default theme
    and I have a question related to the topic
    do I still need to create the child theme to avoid problem of overwritten files?
    thanks

  23. govpatel
    Member
    Posted 2 years ago #

    Yes if you made customizing on your style.css or templates then you will need create child and make changes there.

    http://codex.wordpress.org/Child_Themes#Directory_structure

  24. tarotmeister
    Member
    Posted 2 years ago #

    I have spent all day trying to create a child theme on GoDaddy's file manager. It would get created, but I couldn't get it to activate. (GoDaddy wouldn't help me with that.) All I managed to accomplish was to change some stuff on 2011 on my sites theme manager (or whatever it's called). Doesn't seem to have caused any problems, though, my site still comes up okay. I'm going to search around and see if I can find a theme in black or dark grey that doesn't have that overhead menu. Wish me luck! If that doesn't do it, I don't know what I'll do.
    Gary

  25. carlacuomo
    Member
    Posted 2 years ago #

    @govpatel
    ok then, just double check before going too far
    thanks
    xc

  26. Digital Raindrops
    Member
    Posted 2 years ago #

    @tarotmeister,
    Why not just use one of the starter themes, the instructions are not that hard to follow, just take your time.

    If it gets you going I will even create the child theme for you, just email me david.cox@digitalraindrops.net

    Doesn't seem to have caused any problems, though, my site still comes up okay.

    The issue is not changing the parent theme, yes the changes will work.

    Soon there will be an update of WordPress, and there is more than a likely chance that the Twenty Eleven theme will be updated.

    WARNING: The upgrade process will affect all files and folders included in the main WordPress installation. This includes all the core files used to run WordPress, two plugins (Akismet and Hello Dolly) and one theme (Twenty Ten). If you have made any modifications to those files, your changes will be lost.

    HTH

    David

  27. esmi
    Forum Moderator
    Posted 2 years ago #

  28. Digital Raindrops
    Member
    Posted 2 years ago #

    @esmi, I had already linked to your download as well as mine in this topic!

    Regards

    David

  29. esmi
    Forum Moderator
    Posted 2 years ago #

    Oops! Sorry :-(

Topic Closed

This topic has been closed to new replies.

About this Topic