Home Forums WordPress Themes – Premium Celestial (Celestial Reloaded) Home Page Image Box Widgets

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #15258
    Greg Smith
    Participant

    Hi
    I would like to add to the 4 image box widgets (Top 1 – 4) on the home page. I’ve added code to the widgets.php in the includes folder so that I get Top 5, Top 6, Top 7 and Top 8 in the admin widgets area. However even when I add text to these it doesn’t show on the “live” home page (http://www.dnaclient.co.uk/soundsorba/ ). How do I get the Top 5 to 8 widgets to show?
    Help appreciated. Many thanks, Greg

    #20108
    Sushil Adhikari
    Moderator

    That is very adventurous Greg, to add more widget positions to that area. I really cannot give a tutorial on how this is done as this falls well within customization which theme support does not cover. However, what I can do is list out the files you need to open and explore how the theme’s widgets are coded because this is done from couple file locations:

    1. sidebar-top.php
    2. widgets.php ….there are two parts in this file, the register_sidebar and further below, function topgroup()

    You also need to know how the span classes work for your widget columns. In the widgets.php file you will see the 4 widget code with span12, span6, span4, and span3. The problem here is that you have to keep the number of widget positions (columns) as even numbers keeping in mind you have up to 12 grid columns (the layout of the theme). If you have 7 widget positions with published widgets, this won’t work because 7 does not go into 12 evenly, nor does 5 widgets.

    Now for the bad news…..In a sense, what you want to do is not really going to be possible because of how the theme (using the Bootstrap framework) is built on a 12-grid column layout. This means that if you want up to 8 widget positions side-by-side, for example the Top widget group, you cannot have 5 or 7 widgets published because they do not equally divide into 12. Only 1, 2, 3, 4, and 6 can evenly go into 12. Each widget published per group takes on a width that is equal to each other.

    Your only option would be to use a page builder plugin that lets you create varying sidebar widths with a drag and drop method. So each page you make, you can create different numbers of widgets in a group side by side.

    #20111
    Greg Smith
    Participant

    Thanks for explaining. I’ve added a second row of 4 images with text.
    Help appreciated. Great service, Greg

    #20113
    Sushil Adhikari
    Moderator

    Ah… good job. Before you know it, you will be making themes 🙂

    #20114
    Greg Smith
    Participant

    I don’t think I will – you haven’t seen my latest question……………………
    Many thanks for your great service. Greg

    #20249
    Greg Smith
    Participant

    Hi
    You advised when I increased the “Top” widgets from 4 to 8 which I achieved on http://www.dnaclient.co.uk/soundsorba/ . I’ve now tried the same method to increase to 12 “Top” widgets updating both “sidebar-top.php” and “widgets.php” but cannot get them to appear in the Admin widget section. Have I missed something?
    Help appreciated. Greg

    #20250
    Sushil Adhikari
    Moderator

    Still very risky with all this if you are not familiar with this type of coding, but if you still plan on going ahead with adding more widgets, .you need to look at how I did the widgets.php coding for widgets in the theme. The file is found in the /includes/ folder. Pay attention to how it was done for the theme’s current widget positions, but also check further down the file (// Lets do the top group) to see more code relating to grouped widget positions, such as the Top Group, top1, top 2, etc.

    I’m not sure how this would work in a child theme as any modification to theme files should be done in one, but if you are doing this to the actual theme file(s), you won’t be able to update the theme without losing your custom changes, so please be aware of that.

    #20251
    Greg Smith
    Participant

    Many thanks…I’ll be careful, although I may have found a way round the effect without creating extra widgets.
    Appreciate your help. Superb service. Greg

    #15259
    Sushil Adhikari
    Moderator

    No worries… if whatever you do and find a way, perhaps post it here for anyone else who might be considering doing a similar thing. Cheers!

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.