What file contains homepage?

Posted in: Newspaper
Post count: 84

Hello,

In the old site I used excerpts and now I find that the length is too big. I have already put this code in M16:

<div class=”td-excerpt”>
<?php echo wp_trim_words(get_the_excerpt(), 30); ?>
</div>

I would like to also put the same code in the homepage so I don’t have to manually shorten the excerpt of all my old articles (see this example, http://screencast.com/t/ZLVhak2rydH). Where should I put my code?

Thank you!

Post count: 1291

Hi,

In Newspaper you can control the excerpts from Theme Panel -> Excerpts – http://screencast.com/t/9O2FJ3ClC
If you use the default blog page and the articles are displayed in full you can change this behavior from Theme Panel -> Template settings – by setting another module for the Blog page – http://screencast.com/t/ORIwhn8Zk

Or you could create a custom page using the desired blocks and set it as a homepage from Settings -> Reading – http://screencast.com/t/mLFL3gl9uq

Thank you!

Post count: 84

I don’t think I explained myself properly.

I cannot control excerpts from Theme Panel because unfortunately for the last few years I have been writing excerpts via the WordPress facility. Now I have discovered that they are too long for this theme, as you can see in this screenshot: http://screencast.com/t/cMu09dXshzH.

I need a way to automatically shorten my excerpts on the homepage. I have recreated your default demo so I am using quite a lot of blocks. My problem is where to add the code.

I had the same problem in the categories page but I added this code to M16 and it resolved the issue:

<div class=”td-excerpt”>
<?php echo wp_trim_words(get_the_excerpt(), 30); ?>
</div>

Thanks in advance!

Post count: 6600

Hi,

The theme uses modules to build the block and all module files are located in the include > modules folder: http://screencast.com/t/P1ZwvDpY you can edit each module and change the excerpt as you did for module 16.
You can find more details about modules here: https://forum.tagdiv.com/theme-thumbs/

Thanks

Post count: 84

It doesn’t work, I’m afraid. I went from a huge excerpt appearing in the homepage to none at all!

This is the code I entered: http://screencast.com/t/sBcSHfD43 and this is what I got in the homepage: http://screencast.com/t/VhVm2GU8VSGa

What next?

Thanks!

Post count: 6600

Hi,

I also tested this: http://screencast.com/t/Y9tFPwiDnA and had the expected result: http://screencast.com/t/QWfPE4vRL

Please make sure you have the right format. Replace the code from the forth module files with this one: http://pastebin.com/3RMTbrBu

Thanks

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