• I would like to add a text area below the front page image, above the widgets area. Is there a way to do this? I understand I can make one if I delete 2 of the widget areas, stretching one out, but then I lose all the widget options.

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi there,

    You could add a new widget area to your front page, just above the existing ones, in order to achieve what you’re after. Please note, this will require some familiarity with HTML and basic PHP.

    The first step is to set up a child theme. You can find guidance on how to do that here:

    https://codex.wordpress.org/Child_Themes

    Once you have created your child theme, you can copy/paste the page-templates/front-page.php file from the parent theme.

    From there, you can follow these steps to set up a new widget area:

    http://codex.wordpress.org/Widgetizing_Themes

    Let me know how you get on with that! If you get stuck on any of the steps then I’ll be happy to provide some further guidance.

    Additionally, if you provide a link to your site and let me know some more details about the text you’re trying to add (for example, is it just a line or a long paragraph?) then I can see if there’s another solution for you.

    Thanks!

    Hi! I would also like to know how to add a new widget to the front page. I have my child theme set up and I’m familiar with HTML/CSS, but not so much PHP.

    My website is http://ariananicoledesigns.com and I’m trying to add a full width div in-between the header image and widgets. Is this possible? I tried referencing the link above, but I’m a little stuck getting started.

    Thanks!

    ariananicole – could you please start your own thread and let us know exactly at which step you’re getting stuck. Also let us know in the new thread what type of content you want to put into the new widget area. If it’s just regular post content like text and images, Sela already has a content area that can be moved below the hero area just with some CSS. That would be quite a bit easier than creating a child theme and adding a whole new widget area.

    https://wordpress.org/support/theme/sela#postform

    Thread Starter ckocsis

    (@ckocsis)

    Thank you for replying and helping. The text area I am trying to add would be for text the length of a long paragraph, preferably the width of the 3 widgets below it. I don’t want to lose the hero content area. If there’s an easier way I’ll try it. In the meantime, I’ve got the child theme set up, copied over front-page.php, now I am a little confused. To be clear:

    (following http://codex.wordpress.org/Widgetizing_Themes)
    – I am also coping the functions.php and pasting that first batch of code in there, where?
    – This particular code mentioned it’s for the sidebar, which is not where I want it.
    – Then is the code added to front-page?

    Hi @ckocsis,

    The term “sidebar” is used when registering any widget area in WordPress, even if the area you’re registering is not technically a sidebar. 🙂

    You will need to edit the example code given in the documentation to suit your theme. So, for example, arphabet would be replaced with your own theme’s name. You would also create a new name and ID for the widget.

    Here’s an example of how you could edit your function:

    function sela_child_widgets_init() {
    
    	register_sidebar( array(
    		'name'          => 'Wide Front Page Area',
    		'id'            => 'wide_front_page_area',
    		'before_widget' => '<div>',
    		'after_widget'  => '</div>',
    	) );
    
    }
    add_action( 'widgets_init', 'sela_child_widgets_init' );

    The above function should be added to functions.php.

    When you’ve created your new widget area, you can view the code in sidebar-front-page.php and page-templates/front-page.php to see how the existing widgets have been added to your front page and replicate.

    Would you be able to provide me with a link to your site? It’d be helpful for me to assist you further.

    Hi there,

    I was just re-reading this part of your reply:

    I am also coping the functions.php and pasting that first batch of code in there, where?

    I wanted to note that you shouldn’t copy the entire functions.php file to your child theme. The child theme’s functions.php file should only contain the functions you wish to load in addition to the parent theme’s existing functions. It’s not necessary to copy the existing functions over and doing so could actually cause your site to go down.

    Please do let me know if you have extra questions on that.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Sela – Add text area above widgets’ is closed to new replies.