Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2016-05-29 06:13:19

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Non-Excerpted Sticky Post?

I have a WP CE4 theme set up to display Blog Home w/Sticky Post.

Currently, the sticky post is excerpted. Is there a way to have it display the entire post, but keep all other posts excerpted?

Offline

#2 2016-05-29 11:24:03

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Non-Excerpted Sticky Post?

You'd have to edit the files to achieve that. Without digging into the code, I'm not entirely sure where that would be. Probably in either the index.php or loop.php files. You could run a search over the files for the terms "sticky" or "the_excerpt" to find the relevant chunk.


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2016-05-29 21:24:48

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Non-Excerpted Sticky Post?

Found it!

In loop.php, I changed:

<?php // the Content or the Excerpt? 
if ( 
	(is_home() && of_get_option('post_excerpts')) || 
	is_archive() || is_search() 
){ // post excerpt: ?> 

to

<?php // the Content or the Excerpt? 
if ( 
	(is_home() && of_get_option('post_excerpts') && !is_sticky() ) || 
	is_archive() || is_search() 
){ // post excerpt: ?>

Now, the sticky post(s) are expanded and all other posts are excerpted.

Thanks for the info on which files to look at Matt!

Last edited by Pfredd (2016-05-29 21:26:38)

Offline

Board footer

Powered by FluxBB