How do I…

Posted in: Newspaper
Post count: 184

On Post Template Style 2 I’d like to interchange the location of the subtitle and the post meta (categories, date, etc) so that it will be in this order:

Post Title
Subtitle
Categories

I tried editing the loop-single-2.php but it’s different from other modules. Can someone please help? Thank you!

Post count: 388

I agree that the order is a little bizarre. I rearranged my templates too. 🙂

You’ve got the right idea but templates 2 through 5 have a different breaking of where the header appears — namely in single_template_2.php, _3.php, etc.

Take these lines from loop-single-2.php:

if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) { ?>
        <p class="td-sub-title"><?php echo $td_mod_single->td_post_theme_settings['td_subtitle'];?></p><?php
    }

Find these lines in single_template_2.php:

<div class="meta-info">
                    <?php echo $td_mod_single->get_category();?>

And add this after the category line:

if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) {
        echo '<p class="td-sub-title">' . $td_mod_single->td_post_theme_settings['td_subtitle'] . '</p>';
    }

Same as what was removed from loop-single-2.php but slightly modified to match single_template_2.php’s style in case it matters.

Haven’t tested (I have some other subtitle stuff going on in my implementation), so check back if something doesn’t work.

Post count: 184

Hi!

I was able to rearrange them correctly! Thanks for your mini tutorial! Didn’t know that there is also a single_template_2.php file.

It just makes sense that the subtitle should be below the title, right? I hope TagDiv could get this fixed on the next update. It would be more like the one in The Verge.

Thanks again @TheMediumUTM

Post count: 6600

Hi,

First get this code from loop-single.php file, like this: http://screencast.com/t/6f43j31dH
Than add it in single_template_2.php file like this: http://screencast.com/t/guzPs51Aj
Result: http://screencast.com/t/i7l47CaRz

Thanks

Post count: 184

Hi Lucian,

Thanks! I also did yours and it worked fine.
May I also ask that you guys add this on the next update? Also, a customizer of the subtitle class on the Custom Typography section of the Theme Panel. That would be awesome if so!

Thanks again!

Post count: 6600

Hi,

Thanks for your suggestion, I have added this on our feature requests list and if more people request it we will implement it next updates, we will have to be very carefully what we pick though as we have over 150 feature requests.

Thanks

Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic.