Hi there,
As you can see here http://www.screencast.com/t/Wy1WMbAr the share function is located at the bottow of the post. I would like to move it up, after the text content.
Can you point me the code line to move and the name of the file ?
I just don’t want to hire an IT guy for just this, I would love top achieve that alone.
Thanks :).
Hello Berbi,
For example, if you are using the post template style 1, you should edit the loop-single-1.php core file and move the social sharing bottom call like after your text content, like this -> https://www.screencast.com/t/shhPEGkatlE
Hope this helps!
Thanks for the message!
Hi Catalin,
Sorry, young DIY here :). I tried, but somehow it didn’t work.
As my default post template is “default” http://www.screencast.com/t/WVqhl8xyADA, I opened loop-single.php in /wp-content/themes/Newsmag.
I found the code line http://www.screencast.com/t/dIlv0ivnQmo, now can you let me know where I shall paste it ?
Here is the full code:
<?php
/**
* The single post loop Default template
**/
if (have_posts()) {
the_post();
$td_mod_single = new td_module_single($post);
?>
<article id=”post-<?php echo $td_mod_single->post->ID;?>” class=”<?php echo join(‘ ‘, get_post_class());?>” <?php echo $td_mod_single->get_item_scope();?>>
<div class=”td-post-header td-pb-padding-side”>
<?php echo td_page_generator::get_single_breadcrumbs($td_mod_single->title); ?>
<?php echo $td_mod_single->get_category(); ?>
<header>
<?php echo $td_mod_single->get_title();?>
<?php if (!empty($td_mod_single->td_post_theme_settings[‘td_subtitle’])) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->td_post_theme_settings[‘td_subtitle’];?></p>
<?php } ?>
<div class=”meta-info”>
<?php echo $td_mod_single->get_author();?>
<?php echo $td_mod_single->get_date(false);?>
<?php echo $td_mod_single->get_views();?>
<?php echo $td_mod_single->get_comments();?>
</div>
</header>
</div>
<?php echo $td_mod_single->get_social_sharing_top();?>
<div class=”td-post-content td-pb-padding-side”>
<?php
// override the default featured image by the templates (single.php and home.php/index.php – blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
echo $td_mod_single->get_image(td_global::$load_featured_img_from_template);
} else {
echo $td_mod_single->get_image(‘td_640x0’);
}
?>
<?php echo $td_mod_single->get_content();?>
</div>
<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>
<div class=”td-post-source-tags td-pb-padding-side”>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_the_tags();?>
</div>
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>
</article> <!– /.post –>
<?php echo $td_mod_single->related_posts();?>
<?php
} else {
//no posts
echo td_page_generator::no_posts();
}
Hello Berbi,
Try to copy/paste that code below the get_content() funtion, like this ->
https://www.screencast.com/t/0GMwXQGC
Thanks for the message!
Thanks for your efforts Catalin,
I changed the code : https://www.screencast.com/t/BdOExdeTwx02, I flushed my browser’s cache, I double checked that the change was effective, but the share buttons stay down : https://www.screencast.com/t/lXd0Vk2Hn8vz.
What did I miss ?
Thanks in advanced.
Hello Berbi,
I do not know what kind of changes you made. Notice that I tested on my side and it seems to work as expected, as you can see here -> https://www.screencast.com/t/vkDCTPQZGl0 The sharing bottom has been placed under the content.
Thanks for your understanding!