Use excerpt instead of subtitle in Post title?

Posted in: Newsmag
Post count: 42

We’d like to use the WP excerpt field, instead of the TD subtitle field for the line under the headline of a post.

All our existing posts have used it so we want them to look right.

Where can I make that change? Couldn’t find “subtitle” field in module… probably looking wrong place.

Thanks again, kind of amazed at how good, fast your support is!

Clint

Post count: 7909

Hi,

You can subtitle in post template that you use with – http://screencast.com/t/MlHNyz6Lk

post->post_excerpt

Result: http://screencast.com/t/z612IE33Thttp://screencast.com/t/TVeXXwNh69

Thanks!

Post count: 42

Thanks, great.

Post count: 42

Hi, we tried it later today on loop-single.php and there is no change in default template. Code:

<?php if (!empty($td_mod_single->post->post_excerpt)) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->post->post_excerpt;?></p>
<?php } ?>

Maybe it won’t work on child template?
Thanks again,
Clint

Post count: 42

It does work on template style 1!
Not sure why not on default.

Post count: 7909

Hi,

It should work for all templates (also in default template) please make sure that you haven’t set default post template for site wide – http://screencast.com/t/CS7xR8Wi If have changed there for example to style 1 then that style will be default template when you set from backend of the post – http://screencast.com/t/wkKzrcafZpr

Thanks!

Post count: 42

Hi Alin, thanks I have it working for default, 1, 7, 8.

For rest I did modify loop-single.php the same way, no result.

But it seems loop-single.php is not being used. I renamed it (.off) and single posts still serve.

I had loop-single.php in child theme, but deleted. And template is set to DEFAULT site wide.

Odd? Any ideas?

Clint

Post count: 7909

Hi,

You say that it is working for “default, 1, 7, 8. ” I’m not sure how it’s working for default template if you have renamed/deleted loop-single.php(as this is default post template). Each post style use a different template – http://screencast.com/t/4tGPLtIPpO I’m not sure what custom modification have you done.

Thanks!

Post count: 42

Yes, we added the post_excerpt as follows for each: loop-single.php, loop-single-1.php, loop-single-7.php, loop-single-8.php:

<?php if (!empty($td_mod_single->post->post_excerpt)) { ?>
<p class=”td-post-sub-title”><?php echo $td_mod_single->post->post_excerpt;?></p>
<?php } ?>

I works, but only 1, 7, 8 show excerpt.

If I (temporarily) delete loop-single.php web site posts still load (no cache)! Which means maybe loop-single.php is not being called from this location for some reason?

Thanks again guys!
Clint

Post count: 42

Also post->post_excerpt works for default loop-single.php.

So:

loop-single.php Y
loop-single-1.php Y
loop-single-2.php N
loop-single-3.php N
loop-single-4.php N
loop-single-5.php N
loop-single-6.php N
loop-single-7.php Y
loop-single-8.php Y

I feel like there is something wrong with the installation. As I mentioned when I delete “loop-single.php” everything still works! And I know it shouldn’t right?

Clint

Post count: 42

Ah, no if I delete loop-single.php it stops! It was Cloudflare cache.

Sorry! 🙂

Still can’t get excepts working though on 2-6. Trying!

Post count: 42

BTW I can’t find sub-title code in loops 2 to 6.

Post count: 42

It works. I had to also add post->post_excerpt to these files:

single_template_2.php
single_template_3.php
single_template_4.php
single_template_5.php
single_template_6.php

Clint

Post count: 7909

Hi,

Glad that you figured out for those post templates.

Thanks!

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