How to add new widget to the theme?

February 2013 WordPress Theme
GK User
Wed Nov 05, 2014 12:17 am
Hi! I was trying to add new widget according to your instructions: https://www.gavick.com/documentation/wo ... ess-theme/

Unfortunately without success. I would like to add new widget in green area on attached screenshot. How to do this?
User avatar
Senior Boarder

GK User
Wed Nov 05, 2014 7:50 am
Hello,

Please add new widget area into widgets.json file (according the instructions), and then try to add the following code into Magazine/layouts/header.php file (at the end of this file):

Code: Select all
<?php if(gk_is_active_sidebar('newone')) : ?>
  <div class="newone gk-page">
  <?php gk_dynamic_sidebar('newone'); ?>
 </div>
<?php endif; ?>
User avatar
Moderator

GK User
Wed Nov 05, 2014 8:22 am
Hello!

Thank you for your answear. I tried like you wrote but I'm not satisfied with this solution. The new widget is before the "gray lines". Please see my screenshot. I would like that "gray lines" stay in the same position after adding a new widget.
User avatar
Senior Boarder

GK User
Wed Nov 05, 2014 11:16 am
Try to add the code into Magazine/layouts/before.php file after
Code: Select all
<div id="gk-content-wrap">


but in this case width of your new widget area will be limited to the main container width.
User avatar
Moderator

GK User
Wed Nov 05, 2014 11:32 am
Thank you again. So it is impossible to make new widget area like I presented on my first screenshot? If no could you please write me how to remove or hide "gray lines".
User avatar
Senior Boarder

GK User
Wed Nov 05, 2014 1:58 pm
Unfortunately it's not possible because of the structure. Please add the following code into css/override.css file to remove borders:
Code: Select all
#gk-sidebar > div, #gk-content-wrap {
   border-top: 0;
}
User avatar
Moderator

GK User
Wed Nov 05, 2014 2:36 pm
Thank you for your help and for your time. Have a nice day!
User avatar
Senior Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.