Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Move Next/Previous Post Button
New Landing › How can we help? › Themeforest Theme Support › Dante › Move Next/Previous Post Button
- This topic has 8 replies, 4 voices, and was last updated 10 years by Swift Ideas – Ed.
-
Posted in: Dante
-
January 10, 2014 at 6:29 pm #41670
Hi,
I would like to move the Next/Previous Post bloc below the social share button bloc in a blog post.
I assume that I should modify some line in “single.php”, but as i’am very new in php could you indicate me exactly what bloc of line i should move and where to put it back.
In case I could use the child theme, could give a documentation link to know I to use it.
Thanks.
January 13, 2014 at 5:35 pm #42181Hi there,
If you upload the single.php to the dante-child theme. You’ll want to move lines 228-231:
<ul class="post-pagination-wrap curved-bar-styling clearfix"> <li class="prev"><?php next_post_link('%link', __('<i class="ss-navigateleft"></i> <span class="nav-text">%title</span>', 'swiftframework'), FALSE); ?></li> <li class="next"><?php previous_post_link('%link', __('<span class="nav-text">%title</span><i class="ss-navigateright"></i>', 'swiftframework'), FALSE); ?></li> </ul>
to above line 268:
<?php if ($show_social) { ?>
Hope that helps.
– Ed
January 13, 2014 at 8:42 pm #42245Sorry Ed,
I try but it didn’t work. I also try to delete the mentioned line and flush my cache, but it still appear.
January 15, 2014 at 9:33 am #42593Please, any idea Ed ?
January 16, 2014 at 7:20 am #42861Hi,
You dont have to delete any line, Just move the code block from above to below. If you have deleted any line it could be the reason why its not working.Thanks
TahirFebruary 6, 2014 at 4:27 pm #47109Hi Tahir,
Since the hack you provide me seems to doesn’t work, I back to you because I still want to move the Move Next/Previous post below the share box.
I just upgrade to version Dante 2.01, could indicate me the exact bloc of line to move and where to place it. Please If It’s work for you can send me the whole single.php modified code, so I can make any mistake.
Hope to hear you soon.
Regards.
February 12, 2014 at 12:24 pm #48245You just take the code Ed mentioned
<ul class="post-pagination-wrap curved-bar-styling clearfix"> <li class="prev"><?php next_post_link('%link', __('<i class="ss-navigateleft"></i> <span class="nav-text">%title</span>', 'swiftframework'), FALSE); ?></li> <li class="next"><?php previous_post_link('%link', __('<span class="nav-text">%title</span><i class="ss-navigateright"></i>', 'swiftframework'), FALSE); ?></li> </ul>
copy it, delete it, and paste it below this bunch of code
<?php if ($show_social) { ?> <div class="share-links curved-bar-styling clearfix"> <div class="share-text"><?php _e("Share this article:", "swiftframework"); ?></div> <ul class="social-icons"> <li class="sf-love"> <div class="comments-likes"> <?php if (function_exists( 'lip_love_it_link' )) { echo lip_love_it_link(get_the_ID(), '<i class="ss-heart"></i>', '<i class="ss-heart"></i>', false); } ?> </div> </li> <li class="facebook"><a href="http://www.facebook.com/sharer.php?u=<?php the_permalink(); ?>" class="post_share_facebook" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=220,width=600');return false;"><i class="fa-facebook"></i><i class="fa-facebook"></i></a></li> <li class="twitter"><a href="https://twitter.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=260,width=600');return false;" class="product_share_twitter"><i class="fa-twitter"></i><i class="fa-twitter"></i></a></li> <li class="googleplus"><a href="https://plus.google.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><i class="fa-google-plus"></i><i class="fa-google-plus"></i></a></li> <li class="pinterest"><a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php if(function_exists('the_post_thumbnail')) echo wp_get_attachment_url(get_post_thumbnail_id()); ?>&description=<?php echo get_the_title(); ?>"><i class="fa-pinterest"></i><i class="fa-pinterest"></i></a></li> <li class="mail"><a href="mailto:?subject=<?php the_title(); ?>&body=<?php echo strip_tags(get_the_excerpt()); ?> <?php the_permalink(); ?>" class="product_share_email"><i class="ss-mail"></i><i class="ss-mail"></i></a></li> </ul> </div> <?php } ?>
and above this code
<?php if ($show_author_info) { ?>
Cheers
February 15, 2014 at 10:37 pm #49232Hi Melanie,
Yes it works, but as the block it’s stick with the share box, how can I add a extra padding on the top of Next/Prev box ?
Cheers
February 15, 2014 at 10:57 pm #49237Add the following custom css to add spacing:
.article-body-wrap .share-links { margin-bottom: 30px; }
Hope that helps.
– Ed
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.