Increase Trip Description Character Count

Homepage Forums WP Travel Increase Trip Description Character Count

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

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #7850

    privatejeep
    Participant

    How can I increase the amount of characters of the trip description? This is the description next to the main image on an individual trip page. It seems to be set at around 142 characters. This is too short for my needs.

    Trip link: https://www.privatejeep.com/itinerary/apache-trail/

    #7851

    privatejeep
    Participant

    REQUESTED FEATURE: It would be nice to have as a feature to set the short description and long description when editing a trip. They should be two separate fields we can enter the descriptions into. For now I need the short description character length to be increased… thanks!

    #7857

    Support Team
    Keymaster

    Hello @privatejeep,

    We have noted your request in our feature requests list and will be considered upon the plugin updates.

    As for now, if you wish to increase the length of the excerpt in the trip single page, you can do so by adding the following code in your child theme’s functions.php file :

    add_filter( 'excerpt_length', 'travel_log_child_custom_trips_excerptl_length', 999999 );
    
    function travel_log_child_custom_trips_excerptl_length( $length ) {
    
    	global $post;
    
    	if( ! $post )
    		return;
    
    	$post_type = 'itineraries';
    	
    	if ( defined( 'WP_TRAVEL_POST_TYPE' ) ) {
    		$post_type = WP_TRAVEL_POST_TYPE;
    	}
    
    	if ( $post->post_type === $post_type && is_singular( $post_type ) ) {
    		$length = 800; // No. of Words to use for Trip Single Excerpt.
    	}
    
    	return $length;
    
    }

    You can replace the integer value ( 800 ) with desired no. of words for the excerpt.

    Hope this Helps,

    Best Regards !!

    #7858

    privatejeep
    Participant

    Thank you! Now we need to do the same increase for the slider text description. (also a feature request). Can that be increased with function code as well?

    #7877

    privatejeep
    Participant

    REQUEST: You need to add after the “Short Description” on the trip page a Read More link that sends a visitor to the Overview tab. (see screen-shot)

    Read More link to Overview Tab

    #7890

    Support Team
    Keymaster

    Hello @privatejeep,

    With the latest update of WP Travel plugin ( 1.5.5 ), We have added the support for “Excerpt” meta box field for trips.

    With the feature, you can manually enter the Excerpt text to show in the overview ( Sigle page ), archives and slider. Please update the plugin to latest available version to get the feature.

    As for the Read More tab links to Overview tab, we will consider the feature addition in the future version on WP Travel plugin.

    If you have any queries/issues or requests further, please feel free to write back to us.

    Best Regards !!

    #7892

    privatejeep
    Participant

    I updated the plug-in. So can I delete the code I added to my child theme that you had suggested here for the character length? It’s no longer needed right?

    #7898

    Support Team
    Keymaster

    Hello @privatejeep,

    Yes, the provided code was just a workaround code filter that lets you control the excerpt length for trip single pages.

    As the excerpt meta box lets you manually enter the excerpts for trips, you can remove the previously added code and control the text excerpt from the Trip Edit screen itself.

    If you have any queries/issues or requests further, please feel free to write back to us.

    Best Regards !!

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

You must be logged in to reply to this topic.