Moving Tag display in post template

Posted in: Newspaper
Post count: 20

My client would like to to move the location of the “Tags” to appear above the “Share this” social options on their post template.

For example page: https://reachinghighernh.org/2017/08/01/community-engagement-student-voice-transformed-pittsfield-school/

See image on how they would like this page changed:https://reachinghighernh.org/wp-content/uploads/2017/08/TagChange.pdf

How would I go about making this change? (I can’t seem to locate where this occurs in the template)

Post count: 23312

Hello kdannay,

If you want to make these changes, notice that you should edit the theme core files and make move the function which displays the tags in the place you want. For example, if you are using the post template style 1, you should edit the loop-single-1.php and move the following function, like this -> https://www.screencast.com/t/LjPnecET
Also, I have inspected your website and I saw that you are using such a plugin for your Related Articles for posts -> https://www.screencast.com/t/RFiWa9KAKsVF The hint was done and you have to make later changes yourself because we cannot provide custom services at the moment, sorry!

Thanks for your understanding!

Post count: 20

Hi Caitlin,

I understand that the line
<?php echo $td_mod_single->get_the_tags();?>

Pulls the tags into the footer of the post.

I am trying to understand where the “Share this” icons are pulled into the content.

There is a line <?php echo $td_mod_single->get_content();?>

Somewhere in the “get_content” the “share this” line is added to the post. I have looked through the loop.php, the loop-single.php and the loop-single-1.php. I cannot find where the “share this” is inserted so that I can add the tags above it.

Where is this code:
<div class=”sharedaddy sd-sharing-enabled”> == $0>

Inserted into the post? which template or function?

Thanks

Post count: 23312

Hello kdannay,

I do not know where exactly you want to move the Tags section on your post page, sorry! I guess that you want to achieve the following case -> https://www.screencast.com/t/1zq7n5pjw
If is not what you mean, provide more details and some useful screenshots where you should exactly show me what you want to achieve.

Thanks.

Post count: 14

Hello,

Similar to the initial post in this thread, I’m trying to move the TAGS line in the footer of my posts to appear at the top of my posts. The desired location would be under the AUTHOR/DATE line, under the top SHARE THIS line, or below the featured image in the post.

I was able to access the loop-single-1.php file in the editor. However, the screencast above from Caitlin is no longer active. I’m hesitant to attempt this change in the editor without having the visual of what line to move and where to place it. Would it be possible to repost the screencast showing what line to move and where to put it so my tags appear at the top of my posts?

Thank you in advance!

Post count: 35449

Hi,

So you want to move the tags under the author -> https://www.screencast.com/t/P20FgO5QFnx4 -> https://www.screencast.com/t/rH9nSY77nO5 results -> https://www.screencast.com/t/DOmi6ruV

Thank you!

Post count: 14

Hi Calin,

Thank you for the response. Is it possible to make this edit within WordPress (from within the Theme Editor)? If so, I’m not seeing the exact match for the line you shared in your screencast. The closest I can see is within ‘loop-single.php’ (from within the Theme Editor). Here’s the section I believe has what I need:

// tags
$td_post_tags = get_the_tags();
if( !empty($td_post_tags) ) { ?>
<div class=”td-post-source-tags”>
<ul class=”td-tags td-post-small-box clearfix”>

  • <span><?php esc_html_e(‘TAGS’, ‘newspaper’) ?></span>
  • <?php
    foreach ($td_post_tags as $td_post_tag) { ?>

  • term_id)) ?>”><?php echo esc_html($td_post_tag->name) ?>
  • <?php } ?>

    </div>
    <?php }

    Thank you in advance!

    Post count: 35449

    Hello,

    Yes, you can do that, -> https://www.screencast.com/t/h5PoINjC -> https://www.screencast.com/t/9lnmXeIEBff

    Hope this will help you!
    Thank you!

    Post count: 14

    Hi Calin,

    I was able to move that line in the editor to the header. I’ve saved it and the change is confirmed in the code. However, the tags on my site (even after clearing the cache) are still showing in the footer, not in the desired location.

    Is it possible that ‘loop-single-1’ is not the right file for my posts? If so, is there an easy way to determine which file is driving the layout of my posts so I can edit it accordingly?

    Post count: 35449

    Hello,

    Please notice that you need to change for the loop-single-x.php for the post style you are using that you are using, there was only an example with loop-single-1

    Thank you!

    Post count: 14

    Calin,

    Thank you for confirming. I was able to update the proper file and this now works as desired. Thank you very much for all of your help!

    Post count: 14

    Hello,

    Following-up on the posts above, it appears the recent theme update has overridden the changes I made to the plugin for moving the tags to the tope of posts.

    Where can I locate the loop-single-x.php file to make this change?

    Post count: 35449

    Hi,

    If you are not using a child theme, every time when you’ll make a theme update, the changes made in the theme core will be removed.

    The files for the standard templates 1-13 are set in this path -> wp-content/plugins/td-standard-pack/Newspaper/parts/single the path for the default post style is this one wp-content/plugins/td-composer/legacy/Newspaper/loop-single.php

    Hope this will help you!
    Thank you!

    Post count: 14

    Thank you for the confirmation regarding the child theme. Putting that aside for a second, I’m still unable to locate where to change this setting. To confirm, I’m using the Edit Plugins feature in WordPress. In prior versions, I went through tagDiv Composer and was able to find it. It doesn’t appear to be in the same location anymore (following your screen capture above (from 9/5/2019).

    Post count: 35449

    Hi

    If you are using the plugin editor you’ll need to make these steps -> https://i.imgur.com/cmiNGhK.png -> https://i.imgur.com/6cQG6YD.png and for default post style you’ll need to go in tagDiv Composer, like this -> https://i.imgur.com/KHlcWpv.png

    Hope this will help you better!
    Thank you!

    Post count: 14

    My apologies, but I’m still having trouble making this change. I’m trying to update the default post style to move the tags to the top. Based on your screen captures:

    1. Do I need to update loop-single.php and single-php (via TagDiv Composer)?

    2. If yes to #1, what code needs to be copied where to put that at the top of the post (what I’m seeing in that plugin editor is different than September 2019)?

    Post count: 35449

    Hi,

    Please notice that these changes needs to be made only if you have the proper skills, will be more easy to use a single post template from tagDiv Cloud Library and use tagDiv Composer with drag and drop the element you want where you want, in this way you’ll no longer need to make changes in theme files and these will not be lost when you update the theme.

    1. No in my above example I do not used tagDiv Composer to edit the theme files, this can be done with Plugin editor -> https://i.imgur.com/fJ8T9LL.png

    2. For default post style you’ll need to go in Composer files -> https://i.imgur.com/2SpicW5.png -> copy this line of code -> https://i.imgur.com/QW1gmxb.png and set it under the category -> https://i.imgur.com/XysL0ZK.png

    Thank you!

    Post count: 14

    Thank you. To clarify, I was editing the plugin editor to edit the theme files but was not able to get that to update properly (like it did in September 2019). I would much prefer to not have to make this update every time a new version is released.

    I was able to create a single post template through the Cloud Library. However, even though I set the sidebar to appear to the right in the default position, it is showing on the bottom. This occurred using multiple templates. Any idea on how to get the sidebar to appear properly when using/applying a Cloud Library template? The preview shows it correctly but when I apply it it doesn’t work.

    Post count: 35449

    Hi,

    Usually this problem appear when you are using tagDiv Cloud Library and WPBakery, you’ll need to choose only one of them, if you are using WPBakery please deactivate it and check again.

    Thank you!

    Post count: 14

    That did it. Thank you for all your help!

    Post count: 35449

    Hi,

    I’m glad that I was able to help you!

    Thank you!

    Viewing 21 posts - 1 through 21 (of 21 total)
    The forum ‘Newspaper’ is closed to new topics and replies.