Vettezuki
Member
Posted 1 year ago #
Website: http://www.jacobroundtree.com/
Template: Snow Summit
You'll see the more tag is in the HTML, but the post on the main page is not being truncated. The more tag is doing nothing.
In researching this problem, the only thing I came across was to insert the following code before the_content(). In my case this is in a template file loop.php, where the post processing seems to be handled.
<?php global $more; $more = 0; ?>
I did this but it did not fix the problem. Any ideas?
To the best of my knowledge, the more tag doesn't work in pages, only posts
maybe
<!--nextpage-->
will work for your purpose?
Vettezuki
Member
Posted 1 year ago #
It's supposed to work by default on the home page, which is the only place I need it to work.
I just tried it in a post and it didn't work:(
Vettezuki
Member
Posted 1 year ago #
The homepage is not static. The whole point of of the more tag (as I understand it) is explicitly for shortening long posts on the homepage, not single posts, or other pages, though the latter can be made to work.
try this, it goes in post single before the call to the content, just tested and it worked for me.
<?php global $more; $more = 0; ?>
Vettezuki
Member
Posted 1 year ago #
maybe try it in the main loop which does your blog page?
when I placed that code directly before
<?php the_content('Continue Reading'); ?>
in single.php it made the more show up in my blog as well as single.php. Not sure if that's right but that's what I get.
plugins can cause the more tag to not work too, no recent updates?
okay, false alarm, it wasn't actually working in single.php, was showing the same content on either side of the more.
However, when I put it in the main loop,
just before:
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
I had mucho joy:)
Vettezuki
Member
Posted 1 year ago #
I only started trying to use the more tag yesterday so I don't know if it ever would have worked. I've been that bit of code in loop.php and single.php to no effect.
try my latest suggestion.
Vettezuki
Member
Posted 1 year ago #
Still no dice.
It looks like this in loop.php to make sure we're in the same area.
<?php /* Regular posts. */ ?>
<?php else : ?>
<?php global $more; $more = 0; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'snowsummit' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php else : ?><?php global $more; $more = 0; ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
does your loop have more than one format for displaying posts? maybe you didn't edit the one in use?
Vettezuki
Member
Posted 1 year ago #
Not that I'm aware of. Your referenced line was only in one place.
hmmm, If it's not a plugin conflict I'm stumped. I'm actually stumped over my even needing to do this to make it work for me. I thought it was standard in all themes..Anyone else have any tips here?
Vettezuki
Member
Posted 1 year ago #
I'm in the same boat. I thought this was default and I'd just be able to use the more tag and be done with it immediately. It's turning into a giant PITA. I'm running a few plug-ins. I'll experiment with switching them off later to see if there isn't some interference there.
Vettezuki
Member
Posted 1 year ago #
Looks like I found the culprit. It was this plugin. The modding code doesn't even appear to be necessary.
Custom Post Type View Generator
I don't even remember what I had that plugin for.
aha, maybe I have the same issue, shouldn't need that patch. I just never had a ned for readmore so I never knew. Glad to have helped resolve it for you:)