Community Forums › Forums › Archived Forums › Design Tips and Tricks › Problem with Widget added to Luscious Theme – PHP or CSS issue?
- This topic has 10 replies, 2 voices, and was last updated 11 years, 4 months ago by chantal2012.
-
AuthorPosts
-
November 29, 2012 at 8:40 pm #2444chantal2012Member
I submitted this through the help center and was advised to submit it in the forum. I successfully added a widgeted area to my home page so I could use the Dynamic Content Gallery (I am using the Luscious theme). I was wondering how to add a little bit more space between the bottom of the DCG and the top of the title of my first post.
Also, when I click on one of the articles featured in the DCG and it takes me to the articles, the pics from the DCG are showing up all over the place and everything is messed up. It's kinda like the DCG was partly installed on post pages, not just the homepage. Obviously I want it just on the homepage. I am used to working with the Lifestyle theme and really like this feature.
My site is http://www.auntieshauntie.com
November 29, 2012 at 8:49 pm #2445AnitaKeymasterLook for this in your style.css and then add a bottom margin to it - margin-bottom: 15px;
.before-posts-sidebar {
background: none repeat scroll 0 0 #DDDDDD;
padding: 10px;}
Love coffee, chocolate and my Bella!
November 30, 2012 at 6:35 am #2475chantal2012MemberThanks anitac! That solves my first problem...I still have an issue with my second problem. It seems that the DCG that I installed on my first page is screwing up the rest of the site. Does anyone know how to fix this?
November 30, 2012 at 6:58 am #2478AnitaKeymasterDid you add an image to the Featured Image for the Slider *and* did you add that same picture to the body? The slider is showing up on ALL pages. Can you copy and paste the code you used to get the slider in there?
**Added** This is a very easy way to get the slider or other widget area on your home page only. Read this - http://www.briangardner.com/home-widget-area-eleven40/.
Love coffee, chocolate and my Bella!
November 30, 2012 at 7:26 am #2483chantal2012MemberThis is what I did exactly...I followed the tutorial that the help desk suggested http://designsbynickthegeek.com/tutorials/add-widgeted-sidebar for "Sidebar Before Posts". First I added the following code to my functions.php file:
genesis_register_sidebar( array(
'id' => 'before-posts-sidebar',
'name' => 'Before Posts',
'description' => 'This is a sidebar that goes before the posts in the #content.', ) );Then I added the following code, once again to the functions.php file:
add_action( 'genesis_before_loop', 'child_before_posts_sidebar' );
/** Loads a new sidebar before the posts in the #content */
function child_before_posts_sidebar() {
echo '<div class="before-posts-sidebar">';
dynamic_sidebar( 'before-posts-sidebar' );
echo '</div>';
}Then I added this code to my style.css sheet:
/* Before Posts ------------------------------------------------------------ */
.before-posts-sidebar {
background: #dddddd;
padding: 10px;
}I'm used to using the Lifestyle theme but really like the look of the Luscious Theme. I just wanted to add this widgeted area to my homepage so I could add the DCG but obviously didn't want to screw up the rest of the site. I would appreciate any help. 🙂
November 30, 2012 at 7:35 am #2486AnitaKeymasterWhere you put your second set of functions - I think you need to REPLACE it - here is Brian's code (I modified to add your elements)
** Add the home featured section */
add_action( 'genesis_before_loop', 'child_before_posts_sidebar' );
function child_before_posts_sidebar() {/** Do nothing on page 2 or greater */
if ( get_query_var( 'paged' ) >= 2 )
return;genesis_widget_area( 'before-posts-sidebar', array(
'before' => '<div>',
) );}
I think it should look something like that.
Love coffee, chocolate and my Bella!
November 30, 2012 at 8:05 am #2495chantal2012MemberWhere did you get that code? Can you send me the link?
November 30, 2012 at 8:06 am #2496AnitaKeymasterI sent it above - a few messages up. Brian's is a little easier - http://www.briangardner.com/home-widget-area-eleven40/.
Love coffee, chocolate and my Bella!
November 30, 2012 at 9:36 am #2518chantal2012MemberThat didn't work 🙁 . I will contact the help desk again.
November 30, 2012 at 9:58 am #2529AnitaKeymasterOkay, did you add to what you have or did you use Brian's instead. Maybe if you go back and do it per Brian's instructions you can get it to work. It works like a charm for me. Good luck.
Love coffee, chocolate and my Bella!
November 30, 2012 at 10:44 am #2541chantal2012MemberI did try it per his instructions...hopefully someone else will chime in...thanks for your help! 🙂
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.