Perhaps you could try a regular expression that gets all the words up until the first occurrence of a period.
Yeah and how would I do that?
Technically speaking 🙂
Why not just use the Excerpt input in each Edit Post/Edit Page to handcraft your excerpts?
Try looking on Edit Post for the Excerpt panel.
Yeah tried that but the Exerpt will not be for a post but for a page.
I have a snippet text which will link to the complete page.
With some PHP in my functions.php file I could get the excerpt panel in the edit page but can’t seem to get it working.
How about Custom Fields? If they don’t show on your Page editor you can activate them in the Screen Options dialog. Create a field called First Sentence, then copy in the text from the content.
Ok Garydarling that might be the idea I was looking for
I’ll check it out and let you know
Thnx
Ok I’ve made a custom post and placed the_meta in my script
I’ve tried two different ways but they both don’t work.
the_meta($meta_value, true);
and
the_meta();
If I take a look at the sourcecode of the page I’ll get this:
<ul class="post-meta"> </ul>
So there is no content……
What do I miss?
Here is what I used on a project, works fine:
<?php echo get_post_meta($post->ID, 'Sidebar Text', true) ?>
Ah great thnx Gary.
I fixed it like this because my content is on a childpage of the page where it should be shown.
$short_text = get_post_meta($pageChild->ID, 'short_text', true);
echo $short_text;
Thnx for your help
hi i have a customfield on my posts and i need to display the shorttexte on my homepage can use it like this?
$short_text = get_post_meta($page ->ID, ‘short_text’, true);
echo $short_text;