Site logo

Archived topic

Adjust Excerpt to Ignore Part

3 replies · Started by tjs198 on February 18, 2017

Viewing posts 1–4 of 4

I've been writing a trip report on my blog that will be in 6 parts. I'd like to include an index at the beginning of each blog post that lists each parts (and has links to other parts). How can I have the blog excerpt ignore this index?

Part 2 of trip report is up this morning: http://www.theartoftravelhacking.com/

Hmm, you could wrap your index in a class:

<div class="trip-index">
    Index in here
</div>

Then hide it in the excerpt with some CSS:

.entry-summary .trip-index {
    display: none;
}

thanks but doesn't seem to work.

I put this in the 'text' tab of the post?

<div class="trip-index">
    my Index
    my Part 1
    my Part 2,
    etc
</div>

and i put this code in the simple CSS plugin sheet.

.entry-summary .trip-index {
    display: none;
}

sorry for the beginner questions or am i supposed to put somewhere else?

Hmm thinking about this more, that method wouldn't work as the excerpt strips all HTML.

Your only option may be to specify a manual excerpt for those posts using the "Excerpt" meta box.

If you don't see that meta box, click "Screen Options" at the top right of the screen while editing the post, and check the box next to the "Excerpt" option.

This archived topic is closed to new replies.