Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1330023
    cocooner
    Participant

    I use Ethos but it seems all the stacks, under header, they position the widget area in that top corner area.
    Bummer, not useful for me.

    I’d really really love to have one (two, stacked, would be best!) widget area right above the content (where the slider appears) and under the menu.
    If I can just “recycle” the slider area, sign me up!

    If someone could be so kind to help me on this I’d appreciate.

    I know I’ll probably have to use a child theme, something I’m not familiar with and I’m starting to read something right after this post.

    Thanks!

    #1330443
    Rue Nel
    Moderator

    Hello There,

    Thanks for writing in! To add a new widget area in your site, like under the header, please check out these threads: https://community.theme.co/forums/topic/adding-new-widget-area-to-child-theme/, https://community.theme.co/forums/topic/adding-widget-areas/, https://community.theme.co/forums/topic/add-a-new-widget-area-in-the-header/

    Hope this helps.

    #1330637
    cocooner
    Participant

    Hey there, thanks for the tips.
    This post https://community.theme.co/forums/topic/adding-new-widget-area-to-child-theme/ seems to do what I’m looking for but in the opposite position.

    Could you help me on this part?

    register_sidebar( array(
        'id'          => 'page-bottom',
        'name'        => __( 'Page - Bottom','x'),
        'description' => 'This is the bottom section of the page.',
        'before_widget' => '<div id="page-bottom">',
        'after_widget'  => '</div>',
        'before_title'  => '<h2 class="widgettitle">',
        'after_title'   => '</h2>'
    ) );

    name and description ok I think it’s just that… id I guess it has to be just a single id, ok.
    The before and after parts I’m not sure of tho… it seems it is just encapsulating the area in a Div and the title in an H2… right?

    So the position is set inside /views/ethos I guess (of a child theme). The magic part should be:

    <?php dynamic_sidebar('page-bottom');?>

    So to have the area above the content I guess I have to put that code just above this:

    <div class="entry-wrap">

    Is it so? 🙂 if so if I want another area I guess it’s just a matter of rinse and repeat.

    Thanks.
    Ivan

    #1330649
    cocooner
    Participant

    while waiting for an answer I tried…
    The new widget area show up in the widget selection within WordPress

    It does NOT show up inside x customiser so there’s something wrong here.

    In the other post (that refers to integrity while I use ethos) it is suggested to put content-page.php inside wp-content/themes/x-child-integrity/framework/views/integrity
    I just installed the child theme from the user area here and such a directory doesn’t exist. It goes like x-child/framework/views/integrity… ethos… and so on.

    So do I have to create the path wp-content/themes/x-child-ethos/framework/views/ethos and put my content-page.php there? I don’t want to screw up my site so I’ll wait for some feedback on this.

    Thanks.

    #1330692
    Rad
    Moderator

    Hi there,

    Yes, you have to create the path. You can duplicate all template files and place them on your child theme of the same path, except, /framework/functions/, copying the files there will not work.

    I could help checking your implementation just as long as you provide your admin and FTP login credentials in private reply 🙂

    Thanks!

    #1330704
    cocooner
    Participant
    This reply has been marked as private.
    #1331068
    Rad
    Moderator
    This reply has been marked as private.
    #1331110
    cocooner
    Participant

    First of all thanks for your help!
    I don’t think I get your point tho… shouldn’t it appear on all the pages?

    Do I have to manually add the code elsewhere? more precisely… do I have to edit anything else to have it on the frontage? I thought content-page.php *was* the right place :’)

    Last help please? 🙂

    #1331114
    cocooner
    Participant

    No ok… content-page drives the content of all the pages. Cool tho… I can now customise them all. Now… what’s the file for the main blog page? _index.php? do I just need to add the widget area there in the same way you did for content-page?

    Thanks!! I feel I’m a single step from my goal now 🙂

    #1331118
    cocooner
    Participant

    Edit: I was too fast being happy… now the question is… how can I show the widget area ONLY in the frontpage? it’s probably another .php I’m not aware of.

    #1331481
    Paul R
    Moderator

    Hi,

    You can add a conditional statement to your code to make it show in the front page only.

    eg.

    
    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/CONTENT-PAGE.PHP
    // -----------------------------------------------------------------------------
    // Standard page output for Ethos.
    // =============================================================================
    
    ?>
    
    <?php 
    
    if ( is_front_page() ) {
        dynamic_sidebar('page-upper'); 
    }
    
    ?>
    

    Hope that helps.

    #1331610
    cocooner
    Participant

    Great!! I’ll try it. Many many thanks, five star support.

    #1331616
    Paul R
    Moderator

    You’re welcome! 🙂

    #1331780
    cocooner
    Participant

    just for the records…
    – which is the php file that renders the frontpage in ethos?
    – should I add another widget area and add it like this:

    // =============================================================================
    // VIEWS/ETHOS/CONTENT-PAGE.PHP
    // -----------------------------------------------------------------------------
    // Standard page output for Ethos.
    // =============================================================================
    
    ?>
    
    <?php 
    
    if ( is_front_page() ) {
        dynamic_sidebar('page-upper');
        dynamic_sidebar('page-other');
    }
    
    ?>

    Will they stack? in that exact order?

    Tell me if I’m wrong… there must be a php file calling and glueing together all the views… starting from the header down to the footer. Adding this code to the content php I guess that effectively position my new widget areas after the header and on top of the content… so this is the way one decide where to have an area appear?

    Sorry I read through the views docs but I’m unsure.

    Thanks.

    #1331822
    Paul R
    Moderator

    Hi,

    Yes, it will stack in that order.

    You can check these files.

    wp-content/themes/x/framework/views/ethos/wp-page.php
    wp-content/themes/x/framework/views/ethos/wp-single.php

    https://community.theme.co/kb/customization-best-practices/

    Hope that helps.

  • <script> jQuery(function($){ $("#no-reply-1330023 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>