WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
[closed] Footer Widgets (40 posts)

  1. MCM
    Member
    Posted 1 year ago #

    How can I add footer bars so that I can add widgets in them?

    http://wordpress.org/extend/themes/twentytwelve/

  2. You might want to check out the implementation in /page-templates/front-page.php. On line 34 it calls a sidebar, right before getting the footer content. You could add such a call first thing in footer.php, to only have one place to maintain.

    Konstantin

  3. Håkon Møller
    Member
    Posted 1 year ago #

    I struggled with this for a while. Copying <?php get_sidebar( 'front' ); ?> into footer.php isn't the complete solution, because the footer widgets will be treated like the main sidebar widgets by the css, and therefore be floated to the right. What I found out after inspecting the css is that you need to apply the classes "template-front-page" and "two-sidebars". This is the code that is needed in footer.php:

    <footer class="template-front-page two-sidebars">
    <?php get_sidebar( 'front' ); ?>
    </footer>

    I replaced the whole existing footer element (with id "colophon") with this code. This way, the widgets you put in "First Front Page Widget Area" and "Second Front Page Widget Area" will be included in the footer on every page (these widget area names can be changed on lines 207 and 217 in functions.php). Hope this can be of help to somebody!

  4. Lance Willett
    Theme Wrangler
    Posted 1 year ago #

  5. jaydokie
    Member
    Posted 1 year ago #

    Worked for me by just putting in the last code only in the post above Lance's last one. What if you really need 3 front-page sidebars to keep your footer area from being to much in height?

  6. zeaks
    Member
    Posted 1 year ago #

    Create a child theme first.

    Add this to functions.php (registers the footer widgets)
    http://pastebin.com/KjtwGHUv

    In footer.php add this under the line
    <footer id="colophon" role="contentinfo">
    http://pastebin.com/Ntq8yEFR

    Add this to style.css
    http://pastebin.com/jQHRzr8R

    Now you have 3 footer widget areas

    My free child theme has footer widgets and a few extras if you want to use that http://zeaks.org/general/twenty-plus-lite-twenty-twelve-child-theme/

  7. jaydokie
    Member
    Posted 1 year ago #

    I have a child theme using the default template. I read a post where it was stated that you can't have footer widgets unless you used the front-page template. Am I understanding that correctly? Also, do you add register footer widgets in footer.php in the primary twenty twelve theme or do you copy the footer.php into the child theme directory and edit it? If child theme, would you remove every code and then place this code into the child theme footer.php? Same question with the second line of code in your comment above this one? Also, would I place the footer background color code into the child theme css or to the primary theme footer.php? My site is at http://roundhousetalk.com.

  8. zeaks
    Member
    Posted 1 year ago #

    You would copy the templates to your child theme folder and edit those.

    Don't remove any of the code already in it, add the code posted above to it where it says.

    You'll need to create a functions.php file yourself, make sure to add an opening php tag <?php at the top before adding the code.

    Add any CSS to the child theme style.css

  9. jaydokie
    Member
    Posted 1 year ago #

    Do you just add the http://zeaks.org/general/twenty-plus-lite-twenty-twelve-child-theme/ contents straight into the child theme or do you copy the folder and it's content stratight into the child theme and leave the files inside the folder? My directory is /themes/twentytwelve-child/ so afterwards it would be /twentytwelve-child/twenty-plus-lite/ ?

  10. jaydokie
    Member
    Posted 1 year ago #

    Also, if I create a footer.php myself, what will it look look like before I do anything? Will it be blank and then after editing it will only have the code above from your first comment in this thread? I'm still new and learning.

  11. zeaks
    Member
    Posted 1 year ago #

    If you're installing that child theme you linked, just install it like any other theme, then visit Appearance > theme Options and configure it how you want and add your widgets the same as you would any theme in Appearance > Widgets

    If you're creating the footer yourself (copying it from Twenty Twelve to your child theme) it will look exactly like Twenty Twelves until you make changes to it. Don't remove any code from it, just add the code as I said in the comment above.

  12. jaydokie
    Member
    Posted 1 year ago #

    Ok, I added the additional code to the identified scripts identified above but from your instructions above. Nothing changed and I still have 2 front page widget areas and one I had to put 3 menus in it previously. What should happen when I insert the code into footer.php; functions.php; and style.css? I went into Appearance and Editor and set the theme to your child theme also.

  13. zeaks
    Member
    Posted 1 year ago #

    These widgets won't display on the homepage template, it already has 2. If you're using my child theme then you don't have to do any of that. Just visit Appearance > widgets, set up your widgets and that's it. If you're using the front page template, as your homepage then you won't see them on the front page.

  14. jaydokie
    Member
    Posted 1 year ago #

    Zeaks, do you mean the front-page template? My static page is named "Home" using the default template. Any thoughts?

  15. zeaks
    Member
    Posted 1 year ago #

    I mean the homepage template, it's a special page template that comes with Twenty Eleven that already contains 2 footer widgets.

    Link your site, I don't know if you're using the theme I linked or if you're adding this to your own child theme, or if you've added it to the theme I linked.

  16. jaydokie
    Member
    Posted 1 year ago #

    Ok. It is http://roundhousetalk.com. I do want the footer to appear on every page. Thanks.

  17. zeaks
    Member
    Posted 1 year ago #

    The only CSS I see in that child theme is

    #colophon a{
    color: #960014;
    },

    I doubt the footer php code was added either.

    Follow the step by step instructions I posted above, once you do that, if there's an issue I'll help with it.

  18. jaydokie
    Member
    Posted 1 year ago #

    When I copy the footer.php and function.php into the twentytwelve-child directory, I can't pull up any file in the child theme directory while using Appearance/Editor from the dashboard. I will it again right now. Get right back to you. Thanks.

  19. jaydokie
    Member
    Posted 1 year ago #

    Oh, do I copy the footer.php and function.php from the twenty-twelve directory into twentytwelve-child directory, or am i supposed to create a child file for each? That's where I'm getting mixed up a little. Will wait to hear your response. Thanks.

  20. zeaks
    Member
    Posted 1 year ago #

    copy footer.php from twenty twelve to your child theme folder, add the code to it.

    create a functions.php file and put it in your child theme folder then add the code to it.
    You cant copy the functions.php from twenty twelve because the functions in it will conflict with the parent theme.

  21. jaydokie
    Member
    Posted 1 year ago #

    Ok. I re-read your comment above using the twenty plus lite download. Activated it in Themes Options and attempted to try it in Appearance-Widget. Presently all of my widgets which I want on the right side bar were basically drag and drop. After installing twenty plus lite, it placed only 2 widgets into the first front page and the balance of widgets bumped down to second front page box. Is that ok? And I think I use widget section widget to place my footer links in. Is that correct? When I did have the footer widgets working in twenty eleven, I created a menu in Appearance-Menu for each link title and link so that it laid out in column format with three columns utilizing 4 menus (2 menu widgets in one widget section. That's the format I'm looking for. Can you give me a simple step. I can see that I can add tabs but the second tab isn't the same format as the first in that it looks like it calls for HTML rather than for the pages for each menu. Yours does look really nice if I can get this part figured out.

  22. zeaks
    Member
    Posted 1 year ago #

    There are 3 footer widgets, and then the main sidebar in Appearance > Options. Arrange your widgets there. It's a new theme so it won't use whatever menus and widgets you had set in Twenty Twelve until you reset them.

    As for the html, I have no idea what you're talking about.

    Use this the same as you would Twenty Twelve, visit Appearance > Theme Options to choose from a few settings.

  23. jaydokie
    Member
    Posted 1 year ago #

    Zeaks, I have your plus lite installed, the widgets in the MAIN Sidebar (figured out how to add and place), and there are First Front Page Widget Area and Second Front Page Widget Area. Nothing else. I did place 2 custom widgets in the First and 1 custom widget in the Second. These 3 custom widgets are pages. When I go to the first page of my site, the MAIN is there perfect but nothing else below the MAIN or in the footer area. I didn't copy any of the other 3 steps/instructions above you gave earlier above, but merely copied the twentytwelve plus lite directory into my theme directory and then activated it in Admin and followed the setup of the theme. One thing I notice, consistently when I delete child themes and or add child themes, my page "Home" which is the Reading-Static page gets moved to the trash in pages so I have to restore it and change a few things to get it back to normal. So, what can I do now to get my footers to show? I notice that there are 2 Inactive Sidebars (not used) and 1 Inactive Sidebar.

  24. zeaks
    Member
    Posted 1 year ago #

    If you're just seeing the main sidebar and front page widgets, then you didn't install it properly. You should just install the theme like any other, not copy the contents to another theme folder.

    https://codex.wordpress.org/Using_Themes <-- how to install themes

    http://zeaks.org/widgets.png <-- widget area should look like this.

  25. jaydokie
    Member
    Posted 1 year ago #

    If I edit the files like you said with the code above, everything in admin hangs up and now I can't access my admin dashboard.

  26. zeaks
    Member
    Posted 1 year ago #

    Why are you editing any files, you just said you installed my child theme??

  27. jaydokie
    Member
    Posted 1 year ago #

    I did, but then I got confused. If I install the plus lite, do I need to code any of the code you linked to way at the beginning for adding to in footer.php, function.php and style.css? If not, then the widgets don't set up like http://zeaks.org/widgets.png because only 3 widget areas are available even when I reset up the sidebars. The main shows perfectly but nothing else does.

    Does the 3 links for footer, function, and style add code to those same files in your plus lite link folder, or where? That's what I am getting confused about. Please bear with me.

  28. zeaks
    Member
    Posted 1 year ago #

    Install the theme. Appearance > Themes > Install > upload, then activate it. Visit Appearance > Widgets, if you don't see widget areas like in that image, you did something wrong.

    You don't add any code to anything if you're using my theme. The code was only if you're making your own child theme.

    Good luck.

  29. jaydokie
    Member
    Posted 1 year ago #

    Ok. Got it installed and am now customizing it. The widget page looks just like you showed me. I will finish setting it up and see how it looks. Thanks very much Zeaks. Looked around your website and you got some really good info. I won't close this until I finish. Thanks again.

  30. jaydokie
    Member
    Posted 1 year ago #

    Ok. The template looks great and everything is where it needs to be. However, In the theme and appearance-header image is uploaded and shows but not on the page. In the appearance-background, it should be color #960014 (red) but the image is tiled on it. re-did it twice and same effect. Cleared cache 3 times nothing changes. And I just need the footer to have the same color (#960014) as the background color should be. Almost there. I attempted to change things in both the Appearance/themes and Appearance/header and Appearance/background so I'm lost on that.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic