Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

Viewing 7 posts - 1 through 7 (of 7 total)

Customizations for post items : next-> ,previous

Home Forums Free Theme Support Theron Lite Customizations for post items : next-> ,previous

  • #23318

    shahnaz

    I am using this theme on local host via Mamp and using wordpress 3.5.2.
    Currently, I have restaurants grouped under different categories. Each restaurant is created under a new ‘wordpress post’.

    My problem # 1:
    when i click on a post thumbnail(when doing viewing/not editing), from a category page…
    ie:http://localhost:8888/mysite/category/restaurants-at-mysite/japanese-restaurants-at-mysite/

    there are buttons below for next ‘->’ and previous ‘<-‘. I would like them to only show the next and previous post for the same category eg: ‘Japanese Cuisine’. Right now if i click these buttons it shows all posts regardless of category. Please help to change this. OR if this is not possible, how to remove the next and previous buttons altogether?

    My problem # 2:
    How to selectively remove the links for Fb, Twitter, Pinterest ,Google Plus etc that are seen under the posts?

    I might be using facebook and twitter but i might not need the others.

    I hope my queries are desrciptive and that you will be able to help me .Many Thanks in Advance.
    And thanks for this theme!

    #23331

    Towfiq I.

    administrator

    1. open up single.php and replace this:

    					  <?php if (is_attachment()){ previous_image_link( false, '&#171; '.__('Previous Image' , 'theron').'' ); } else { previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', 'theron' ) ); } ?> 
                          </div>
    						<div class="alignright"><?php if (is_attachment()){ next_image_link( false, ''.__('Next Image' , 'theron').' &#187;' ); } else { next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', 'theron' ) ); } ?>

    with:

    					  <?php if (is_attachment()){ previous_image_link( false, '&#171; '.__('Previous Image' , 'theron').'' ); } else { previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', '%in_same_cat = 1', 'theron' ) ); } ?> 
                          </div>
    						<div class="alignright"><?php if (is_attachment()){ next_image_link( false, ''.__('Next Image' , 'theron').' &#187;' ); } else { next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', '%in_same_cat = 1', 'theron' ) ); } ?>

    2. Add this to the very bottom of your stylesheet:

    .lgn_del, .lgn_digg, .lgn_stmbl, .lgn_gplus, .lgn_pin{display:none;}

    #23337

    shahnaz

    Thank you. I have followed your instructions.

    My Problem # 1:
    I went to mamp> htdocs> wp-content> mysitefolder >themes> theronlitechild> single.php and changed the code.
    How ever it still shows all mixed categories when i click on the next and previous buttons.
    eg: category fast food is the parent of sub category kfc,burger king etc , category restaurants are parent category of restaurant 1, restaurant 2 etc….
    but if i click on restaurant 1 post and then its next button it shows me kfc and burger king also.

    i then proceeded to delete the lines altogether.
    and now i do not have any prev or next buttons.

    Is there any further change to this line you have specified?

    
    					  <?php if (is_attachment()){ previous_image_link( false, '« '.__('Previous Image' , 'theron').'' ); } else { previous_post_link( '%link', __( '<span class="meta-nav">&larr;</span> Previous', '%in_same_cat = 1', 'theron' ) ); } ?> 
                          </div>
    						<div class="alignright"><?php if (is_attachment()){ next_image_link( false, ''.__('Next Image' , 'theron').' »' ); } else { next_post_link( '%link', __( 'Next <span class="meta-nav">&rarr;</span>', '%in_same_cat = 1', 'theron' ) ); } ?>
    

    My Problem # 2:
    i added the

    .lgn_del, .lgn_digg, .lgn_stmbl, .lgn_gplus, .lgn_pin{display:none;}
    

    to the end of style.css of child theme…
    still seeing all those social icons on the bottom of posts though.

    pls note i have also tried changing all the specified codes in the parent theme theron-lite files to see if there is any change.. but no.
    Now i have reverted back.

    Any suggestions? Thanks for your prompt support.

    #23338

    Towfiq I.

    administrator

    1. it should have worked. not sure why its not working. and yes you have removed the code correctly.
    2. you could also try removing these lines from share_this.php:

    <div class="lgn_del">
    				<a title="<?php _e('Submit to', 'theron'); ?> Delicious" href="http://del.icio.us/post?url=<?php the_permalink() ?>&title=<?php echo urlencode(the_title('','', false)) ?>">del.icio.us</a>
                    </div>
                    <div class="lgn_digg">
                    <a href="http://digg.com/submit?phase=2&amp;url=<?php the_permalink() ?>&amp;title=<?php echo urlencode(the_title('','', false)) ?>" title="Digg <?php _e('this post', 'theron'); ?>">digg</a>
                    </div>
                    <div class="lgn_stmbl">
                    <a title="Stumble <?php _e('This', 'theron'); ?>" href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php echo urlencode(the_title('','', false)) ?>">stumbleupon</a>
                    </div>
                    
                    <div class="lgn_gplus">
                    <a title="Plus One <?php _e('This', 'theron'); ?>"" href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php echo the_permalink(); ?>">Google +1</a>
                    </div>
                    
                    <div class="lgn_pin">
                    <a href='javascript:void((function()%7Bvar%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;http://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)%7D)());'>Pinterest</a>
                    </div>
    #23340

    shahnaz

    My Problem # 1:
    I have tried again in parent and child themes. still not working. Let me try again. with more posts and categories.
    Or I will just remove the previous and next buttons till then.
    My Problem # 2:
    I followed your guidelines: you could also try removing these lines from share_this.php:
    and yes it has removed the unwanted social icons.Thanks again.

    #71239

    Jenny

    Hi,

    I am trying to get Pinterest (.lgn_pin) to show up the same way Facebook, Twitter, Digg, etc do at the bottom of each post and then be able to the pin the link to a board on Pinterest. I got close by adding the code to the stylesheet and share this_php, it says Pinterest but when you click on it takes you Pinterest but I am unable to pin it. Also, the image icon is not there- only the words Pinterest. Please advise. Thank you.

    #71469

    Towfiq I.

    administrator

    whats your site address?

You must be logged in to reply to this topic.