• Home
  • WordPress
    • How To
    • Plugins
    • Themes
      • Genesis
      • Themify
      • Mysite myway
    • Security
    • Developer
    • Teaching
    • Conference
    • Chat
  • Blog
  • About
  • Freelance
    • Plugins
    • Teaching
    • Need help?
    • CV og ref.
  • Contact

Easy Web Design Tutorials

WordPress Tutorials and more

  • Home
  • WordPress
    • How To
    • Plugins
    • Themes
      • Genesis
      • Themify
      • Mysite myway
    • Security
    • Developer
    • Teaching
    • Conference
    • Chat
  • Blog
  • About
  • Freelance
    • Plugins
    • Teaching
    • Need help?
    • CV og ref.
  • Contact

24 February - 2015 By Paal Joachim 1 Comment
Last updated on: July 3, 2016

How to use and style the excerpt

I want to show good stylized previews of the posts on the home page without using featured images.
One way is use excerpts with a Visual Editor (TinyMCE editor) to stylize the excerpts.

An example before I stylize the preview.

Preview posts

 

To see the TinyMCE visual editor in your excerpts.

Add the following code your child theme functions.php file or custom plugin.
The second code. Forces the read me to be added to the bottom of the post preview excerpt.

NB!
In your posts editor screen. Remember to turn on the Excerpts box by going to Screen Options top right, and turn on excerpts so you can see it below your post content area.

I went to one of the posts I made. Copied some of the text from the post content area and pasted it into the excerpt area. (Btw the screenshots are from the Norwegian Sustainable Society web site okosamfunn.no)

 

Post Excerpt visual Editor

 

The post preview that also includes a read more (in Norwegian it is Les Mer).

stylized preview posts

 

Btw.
Since I am using Genesis I also needed to go to Genesis -> Theme Settings and change Content Archives to Display post excerpts. To have the archives (blog page) show the excerpts I made. Here I could also include the featured image if I choose to do so.

Genesis Theme Settings Content Archives

 

Adding an excerpt to a page

Add the following code snippet to your functions.php file to enable excerpt on pages:

function add_excerpts_to_pages() {
add_post_type_support('page', 'excerpt');

}
add_action('init', 'add_excerpts_to_pages');

 

A helpful plugin:
Advanced Excerpt WordPress Plugin

Two other plugins:
Easy custom auto excerpt WordPress plugin
Rich text excerpts WordPress plugin

Share this:

  • Email

Categories: Developer, Genesis, WordPress

Paal Joachim Romdahl

I enjoy teaching and creating tutorials. As well creating web sites.
I help people gain WordPress knowledge through my easy to follow tutorials and specialized training. Contact me for more information on how I can improve your WordPress skills and to help get your web site quickly up and running.

Comments

  1. zeev says

    7 August - 2015

    thank you ! that code was superb ! i was trying sevral solutions and yours war the only one who worked (with wordpress 4.22)

    cheers

    Reply

Leave a Comment Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

© 2021 · By Easy Web Design Tutorials · Built on the Genesis Framework · WordPress · Log in · ⇪

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.