Hi Adrian,
Thank you for waiting and sorry about the delay in getting back on this.
1. Truncating long field's text:
I found a custom shortcode in your website's active theme's "functions.php" file and was able to make it work, after slight modifications:
Updated code:
function custom_trim_field( $atts, $content = null ) {
// Extract any arguments passed
extract( shortcode_atts( array(
'length' => 40, // Number of words to show
'more' => ' Read More...', // Text to show at the end of the filtered text
'field' => ''
), $atts ) );
global $post;
if ( empty($field) ){
return;
}
if ( !isset($post) ){
return;
}
$field = wp_strip_all_tags(types_render_field($field, array("raw"=>"true")));
$excerpt_more = apply_filters('excerpt_more', $more); // Create excerpt length to excerpt_more filter
$readmorelink = '<a href="'.get_permalink($post->ID).'">'.$excerpt_more.'</a>';
$output = wp_trim_words( $field, $length, $readmorelink ); // create the filter text
return $output; // return filter text
//example: [trimfield length="50" more="Carry On..." field="FIELDNICENAME"]
}
add_shortcode( 'trimfield', 'custom_trim_field' );
Here is how it can be used in the content:
[trimfield length="80" more="Carry On..." field="overview"]
Feel free to replace length (80), more text (Carry On...) and target fields slug (overview), as needed.
Note: For more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
2. Accessing the shortcode text in the "Fields and Text" block:
When a shortcode is inserted in a "Fields and Text" block, it can be edited by switching to the "HTML" mode:
Example screenshot: hidden link
3. Post link to the image in the "Fields and Text" block:
You have the following shortcode, in the "Fields and Text" block to show the image:
[types field='main-image' title='%%TITLE%%' alt='%%ALT%%' align='center' size='custom' width='300' height='200' resize='crop'][/types]
You can include it in a link tag using the "[wpv-post-url]" shortcode like this:
( ref: https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-post-url )
<a href="[wpv-post-url]">[types field='main-image' title='%%TITLE%%' alt='%%ALT%%' align='center' size='custom' width='300' height='200' resize='crop'][/types]</a>
4. Showing search form and the search results in different sections, on the same page:
I'm afraid this is not supported for a view created using the Blocks editor, on the same page.
To achieve this, you have a couple of options:
a). You can use custom CSS code to show the search form, map and the results in different virtual columns.
OR
b). You can remove this view on the home page, recreate it on some other page and then insert that new view on the home page, as an existing view.
When you'll be inserting the existing view, you'll see the option to show either search form and results, only the search form or only the search results.
I hope this helps and please let me know if you need any further assistance around any of these points.
For a new question/concern, please open a new ticket.
regards,
Waqar