Travelous: Add Custom Excerpt Capabilities

travelous slider

Hi, this time i will share some update for your Travelous WordPress theme. As your see on the image above, Travelous have a main slider that will displaying the chosen review post type based on its category.

The slider itself will displaying the review thumbnail (from its featured image), title, excerpt and also the tags. On this tutorial, you will learn about how to modify the slider to displaying a custom excerpt (your own excerpt).

To do this modification, you only need to modify a file named theme-custom-type.php. This file can be found via FTP at directory: wp-content → themes → travelous → includes.

Open the file and find out this code:

'rewrite' => array( 'slug' => 'review' ),
        'has_archive' => true, 
        'taxonomies' => array( 'review_category','post_tag' ),
		'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', 'custom-fields')

Modify it become:

'rewrite' => array( 'slug' => 'review' ),
        'has_archive' => true, 
        'taxonomies' => array( 'review_category','post_tag' ),
		'supports' => array('title', 'editor', 'thumbnail', 'author', 'comments', 'custom-fields', 'excerpt')

Once you did it, edit any review post type you’ve made or create a new one.

add review excerpt

Click the button at the top-right named screen options and activate an option named excerpt. Then scroll your screen down and you will find a new field named excerpt.

You can type your own text here to be displayed at the slider. Even if you left this option blank, the system will automatically generate the excerpt from your post.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s