Add Comments to Post List, and Menu Glitch

WordPress theme dedicated to start-up websites with amazing CSS3 animated icons, price tables and parallax effect background.
GK User
Sun Jan 12, 2014 2:10 am
Here's the site I'm working on:

http://foreverjobless.com

I'd like to do two things:

One, I'd like to add a comments display to the right hand side of the post titles, like this: http://www.viperchill.com/

He has a yellow comment bubble on the right side of every post, I'd like to do something similar.

Second, if you notice when you scroll down, and the menu changes from the top menu to the "sticky menu", there's a big leap. Like if you're trying to read the first words of a post, the menu will often cause the page to leap over them. This problem is even bigger on mobile.

Any quick fix?

Thanks!
User avatar
Junior Boarder

GK User
Sun Jan 12, 2014 10:58 pm
Also, I'd like to add a highlight to the author's comments. I've done this in the past with something like this:

Code: Select all
.commentlist .bypostauthor {border-top: 10px solid #48ab5c;}
.commentlist li ul.children li.bypostauthor {border-top: 10px solid #48ab5c;}


However, this code doesn't work when inputted into the override. Through Firebug, it looks like there's no specific selector for the author of the post. Is this something to do with the theme or am I missing something? Thanks.
User avatar
Junior Boarder

GK User
Mon Jan 13, 2014 3:27 pm
Hi,

Use this css code to style author's comments:
Code: Select all
#comments .bypostauthor {
}


In regards to the comment in bubble, it's not so easy, please check appsprotech theme there are similar comments:
http://demo.gavick.com/wordpress/appsprotech/?p=806
Check gavern/helpers/helpers.layout.fragments.php file and remove Comment/comments, levae only numbers, then you can use background image or :after, :before pseudoelement to achieve this bubble.

In regards to the issue with big leap during scrolling - it's cause by your css from override.css file, probably this one:
Code: Select all
.imageBg #gkHeaderMod {
  margin-top: -150px;
  margin-bottom: 0px;
}
User avatar
Moderator

GK User
Mon Jan 20, 2014 9:25 pm
Hey Piotr, thanks for the reply here.

I've tried adding the comments from the app theme to simplicity. However, they're not showing up. I'm not exactly sure what you mean by "remove comment/comments"

Here's the code I have... anything obviously wrong?

Code: Select all
function gk_post_meta($attachment = false) {
    global $tpl;
    
    $params = get_post_custom();
     $params_aside = isset($params['gavern-post-params-aside']) ? $params['gavern-post-params-aside'][0] : false;
    
     $param_aside = true;
     $param_date = true;
     $param_author = true;
     $param_comments = true;
    
     if($params_aside) {
      $params_aside = unserialize(unserialize($params_aside));
      $param_aside = $params_aside['aside'] == 'Y';
      $param_date = $params_aside['date'] == 'Y';
      $param_author = $params_aside['author'] == 'Y';
      $param_comments = $params_aside['comments'] == 'Y';
     }
    
    ?>

    <?php if($param_aside) : ?>
    <aside class="meta">
       <dl>
          <?php if ( comments_open() && ! post_password_required() && $param_comments ) : ?>
             <dd class="comments">
                <?php
                   comments_popup_link(
                      '<span class="leave-reply">' . __( '0', GKTPLNAME ) . '</span>',
                      __( '<b>1</b>', GKTPLNAME ),
                      __( '<b>%</b>', GKTPLNAME )
                   );
                ?>
             </dd>
          <?php endif; ?>
       </dl>
   </aside>

       
    <?php
}


Thanks!
User avatar
Junior Boarder

GK User
Tue Jan 21, 2014 8:29 pm
"remove Comment/comments"I mean remove these strings, and leave only numers, code seems to be ok but I don't see date, Written by etc, do you have enabled "Post sidebar informations" from Template Options - > basic tab?
User avatar
Moderator

GK User
Wed Jan 22, 2014 2:45 am
Yes I do.

Reason why the date and written by aren't there is because I don't want that information to show up – only the comments.
User avatar
Junior Boarder

GK User
Wed Jan 22, 2014 7:38 pm
Ok, but if you disabled this option every fields will be disabled (also with comments), so you have to enable it and then rebuild your gk_post_meta function from helpers.layout.fragments.php file.
User avatar
Moderator

GK User
Fri Jan 31, 2014 11:19 pm
Hey Piotr, what's the best way to disable the sticky menu entirely on this theme? I like the top menu, but it doesn't need to be fixed to the top.
User avatar
Junior Boarder

GK User
Sat Feb 01, 2014 2:20 pm
Hi,

Add this cod to override.css file
Code: Select all
#gk-menu-wrap {
position: absolute;
}
User avatar
Moderator

GK User
Fri Feb 07, 2014 6:09 am
That worked great. However, my page still jumps when the second menu is triggered, even though it isn't there.

Is there any way to cut out the trigger that makes that menu appear? Is it in a javascript file? Here's my site for reference:

http://foreverjobless.com/
User avatar
Junior Boarder

GK User
Fri Feb 07, 2014 8:09 am
Yes, you have to make changes in js/gk.scripts.js file. Send me a PM with FTP access, then I'll try to help you with that.
User avatar
Moderator


cron