Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #105032

    julie
    Participant

    I have created a child theme and want to add an editable area for site sponsor logos above the footer. I presume the way to do with would be to use a widget? How can I create a new widget or utilize one of the existing footer widgets maybe so it displays where I want it to?

    thanks in advance for your help

    #105040

    Mrinal
    Member

    Hi Julie,

    Please go to Appearance > Widgets > The add widget to Footer areas.

    #105364

    julie
    Participant

    Thanks for your reply but I want to add a new widget area but not in the footer. I want it to below on every page just below the content spanning the width of the page but not in the footer? Hope that makes sense?

    #105416

    Nabeel A
    Moderator

    Hey Julie,

    This sounds like a custom development task, which might be out of our scope. Anyhow please provide us the URL of your website so we can take a look if there is any work around for this.

    #105612

    julie
    Participant
    This reply has been marked as private.
    #105615

    julie
    Participant
    This reply has been marked as private.
    #105681

    Paul R
    Moderator

    Hi Julie,

    Please follow the steps below to add a widget.

    1. Add the code below in functions.php of child theme

    
    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>'
    ) );
    

    2. Create the file content-page.php in wp-content/themes/x-child-integrity/framework/views/integrity and add the code below.

    
    <?php
    
    // =============================================================================
    // VIEWS/INTEGRITY/CONTENT-PAGE.PHP
    // -----------------------------------------------------------------------------
    // Standard page output for Integrity.
    // =============================================================================
    
    $disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
    
    ?>
    
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
      <div class="entry-featured">
        <?php x_featured_image(); ?>
      </div>
      <div class="entry-wrap">
        <?php if ( is_singular() ) : ?>
          <?php if ( $disable_page_title != 'on' ) : ?>
          <header class="entry-header">
            <h1 class="entry-title"><?php the_title(); ?></h1>
          </header>
          <?php endif; ?>
        <?php else : ?>
        <header class="entry-header">
          <h2 class="entry-title">
            <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a>
          </h2>
        </header>
        <?php endif; ?>
        <?php x_get_view( 'global', '_content' ); ?>
      </div>
      <?php x_google_authorship_meta(); ?>
    </article>
    <?php dynamic_sidebar('page-bottom');?>
    

    3. Go to Appearance > widgets and add contents to your newly added widget called Page Bottom.

    You are welcome to change the name of the widget to anything you like.

    4. You can add custom styles by using the id page-bottom to target the widget.

    Hope that helps.

    Cheers

    #105700

    julie
    Participant
    This reply has been marked as private.
    #105729

    Zeshan
    Member

    You’re most welcome Julie! 🙂

    #240002

    andybking
    Participant

    Do you still need to do this to add a widget to the sidebar? Seems an awfully awkward way to populate a sidebar that is included in the theme (and one I am hoping has been fixed). I am using Renew. Thanks.

    #240045

    Christian
    Moderator

    Hey Andy,

    You can add a widget to a sidebar provided by X out of the box by going to Appearance > Widgets. The solution provided is for making a new widget area in a template file.

    Actually, you do not need step 1 in the previous reply if you need a quick way of generating a new sidebar as you can use our Unlimited Sidebar feature. Just add a new sidebar in Appearance > Sidebar and get the Sidebar ID (see http://prntscr.com/6o7cs5). You will need to do steps 2 and 3 though. You need to do step 1 if you need complete control of the sidebar or tweak its settings.

    If I’m not understanding you correctly, please give us more clarification.

    Thanks.

    #240068

    andybking
    Participant

    Thanks for the super-fast response.

    OK — slight misunderstanding. Sorry. I was using Advanced Text plugin to add to the widget, and it was not showing up at all. It is still not working, but I was able to add a shortcode using another widget text feature. Is there an advanced text plugin (allowing php and HTML, plus title suppression) that is compatible with X themes?

    #240102

    Christian
    Moderator

    I’ve not seen a plugin with that feature. Moreover, allowing PHP in admin is a security risk. What you need is technically possible but that would require custom development. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://theme.co/x/member/custom-development/.

    Thanks.

    #309427

    gauravsanan1
    Participant
    This reply has been marked as private.
    #309467

    Thai
    Moderator

    Hi @gauravsanan1,

    Try creating the file woocommerce.php in /x-child/framework/views/ethos and add the code below:

    <?php
    
    // =============================================================================
    // VIEWS/ETHOS/WOOCOMMERCE.PHP
    // -----------------------------------------------------------------------------
    // WooCommerce page output for Ethos.
    // =============================================================================
    
    ?>
    
    <?php get_header(); ?>
    
      <div class="x-container max width main">
        <div class="offset cf">
          <div class="<?php x_main_content_class(); ?>" role="main">
    
            <?php if ( x_is_product() ) : ?>
              <?php x_ethos_entry_top_navigation(); ?>
            <?php endif; ?>
    
            <?php woocommerce_content(); ?>
            <?php dynamic_sidebar('page-bottom'); ?>
    
          </div>
    
          <?php get_sidebar(); ?>
    
        </div>
      </div>
    
    <?php get_footer(); ?>

    Hope it helps.