excerpt

Homepage Forums WP Travel excerpt

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Support Team 1 year, 10 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4068

    lukazj
    Participant

    Hello,

    Can we set the excerpt? the first sentence of my trip is not really suitable, and it seems to grab this. We cant seem to set the excerpt like with a post.

    #4082

    Support Team
    Keymaster

    Hello @lukazj,

    You can manage the content to display as the description at the frontend from “Description” section of the individual trip. You can place your desired content here and that will be displayed at the frontend.

    https://image.prntscr.com/image/16q9UT-5TnSrTZTkmPFf4Q.png

    However the plugin doesnot have the feature to control the no of the word that displays. So to be able to control the word to display you have to use the custom code.

    For this activate the child theme. You can even activate the child theme using the plugin given below:

    https://wordpress.org/plugins/wp-child-theme-generator/

    After activating the child theme, in your child theme functions.php file paste below given code.

    function wp_travel_excerpt_length_customize( $length ) {
    	if ( get_post_type() !== WP_TRAVEL_POST_TYPE ) {
    		return $length;
    	}
    
    	return 15;
    }
    
    add_filter( 'excerpt_length', 'wp_travel_excerpt_length_customize', 999 );

    You can change the no as per your requirement.

    Hope this helps.

    Best Regards!!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.