Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author wpseek

    (@alphawolf)

    Hey plasmax,

    that’s a pretty uncommon usage scenario, so adding it to the source would quite bloat the plugin. Maybe a javascript/CSS solution would suffice.

    May you please link to your archive/page so I can see what can be done with JS/CSS? ??

    Thread Starter Pelly Benassi

    (@plasmax)

    sorry mate I totally forgot to attach the link!
    https://1074092105.n1411413.test.prositehosting.co.uk/2.0/category/news/

    thanks ??

    Thread Starter Pelly Benassi

    (@plasmax)

    sorry one more question: is it possible, when you load the page, to see the first year collapsed?

    Thread Starter Pelly Benassi

    (@plasmax)

    I did a mistake, I meant: is it possible, when you load the page, to see the first year expanded?

    Plugin Author wpseek

    (@alphawolf)

    Hey plasmax,

    expanding the first year would be done by adding the following javascript whereever you want:

    jQuery(document).ready(function() {
    	jQuery('#gk-sidebar #sya_container h3:first a:last').trigger('click');
    });
    Thread Starter Pelly Benassi

    (@plasmax)

    it works like a charm!
    thank you very very very much!
    if you’ve got an idea about how to highlight the current post it would be nice, if not, you did enough.

    cheers!

    Plugin Author wpseek

    (@alphawolf)

    Hi plasmax,

    I’m pushing a little update first, because currently it’s not possible even with a CSS or Javascript solution. After I’ve released the updated version (which will be in a couple of minutes), I’ll keep you posted about how to achieve your goal with JS. ??

    Plugin Author wpseek

    (@alphawolf)

    So I released version 1.6.2.5, which allows you to use the following javascript snippet:

    jQuery(document).ready(function() {
    	if( jQuery('body.single-post').length > 0 ) {
    		var os_post_id = jQuery('body.single-post article').attr("id").match(/[\d]+$/);
    		jQuery('#gk-sidebar #sya_container ul li a[class=post-'+os_post_id+']').addClass('active');
    	}
    });

    After that you can style the active link whatever you like with CSS, e.g.

    #gk-sidebar #sya_container ul li a.active { color: #27AAE1; }

    Thread Starter Pelly Benassi

    (@plasmax)

    nothing to say mate, just a BIG thank you!
    you are very kind doing this for free. this is Opensource!

    5 stars ??

    thanks again!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Highlight current post’ is closed to new replies.