-
AuthorPosts
-
September 15, 2014 at 7:44 am #105032
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
September 15, 2014 at 7:49 am #105040Hi Julie,
Please go to Appearance > Widgets > The add widget to Footer areas.
September 15, 2014 at 3:41 pm #105364Thanks 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?
September 15, 2014 at 5:36 pm #105416Hey 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.
September 16, 2014 at 4:18 am #105612This reply has been marked as private.September 16, 2014 at 4:21 am #105615This reply has been marked as private.September 16, 2014 at 7:09 am #105681Hi 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
September 16, 2014 at 7:31 am #105700This reply has been marked as private.September 16, 2014 at 8:12 am #105729You’re most welcome Julie! 🙂
April 1, 2015 at 11:20 am #240002Do 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.
April 1, 2015 at 11:52 am #240045Hey 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.
April 1, 2015 at 12:06 pm #240068Thanks 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?
April 1, 2015 at 12:47 pm #240102I’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.
June 22, 2015 at 9:34 am #309427This reply has been marked as private.June 22, 2015 at 10:25 am #309467Hi @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.
-
AuthorPosts