Adding Class to Img Tag / Custom Image Size Not Loading via Shortcode
Started by: JoelK2744
in: Toolset Professional Support
Quick solution available
Problem:
The user is using a lazy loading plugin to optimize the loading of images, he needs to add a specific class to the tag generated by the Image block.
The classes added to the image block settings are added in the
tag that wraps the tag.
Solution:
We can work around this using custom code:
function add_class_to_image_block( $block_content, $block ) {
if ( $block['blockName'] === 'toolset-blocks/image' ) {
return str_replace( '<img src', '<img class="my-class" src', $block_content );
}
return $block_content;
}
add_filter( 'render_block', 'add_class_to_image_block', 10, 2 );
Relevant Documentation:
https://developer.wordpress.org/reference/hooks/render_block/
2
6
4 years, 7 months ago
JoelK2744
Create a table with a custom search, filtering, pagination.
Started by: LennyS7960
in: Toolset Professional Support
2
3
4 years, 7 months ago
LennyS7960
Issues with Gutenberg : Dynamic blocks don't show on frontend (image/conditional
Started by: christopheC-3
in: Toolset Professional Support
3
6
4 years, 7 months ago
Shane
Blank fields in custom posts now appearing on front end
Started by: JessicaZ4686
in: Toolset Professional Support
3
3
4 years, 7 months ago
Shane
Comments input field for Custom Post Type
Started by: katjaS-3
in: Toolset Professional Support
Quick solution available
Problem: I would like to display the Comments input field and existing comments in the template for a custom post type, but I do not understand how to display them in my Content Template using Toolset Blocks.
Solution: Normally the comments section is displayed by the theme when comments and discussion are enabled for a post. Usually no additional blocks are necessary in the Content Template. To enable comments for Rezensionen posts, go to Toolset > Post Types and edit the post type Rezensionen. In the Sections to display when editing panel, activate comments. Now when you create or edit a Rezensionen post in wp-admin, you have the ability to turn on or turn off discussion for that individual post.
2
3
4 years, 7 months ago
katjaS-3
Various Questions Regarding General Usage
Started by: Shukla
in: Toolset Professional Support
2
3
4 years, 7 months ago
Shukla
Split: How to add interactive elements in Toolset content templates
Started by: Shukla
in: Toolset Professional Support
2
3
4 years, 7 months ago
Shukla
ACF Select Field as View Search Field outputs array instead of list
Started by: davidV-6
in: Toolset Professional Support
2
10
4 years, 7 months ago
Jamal
Dynamic download button is not offering to link custom field “file”
Started by: andreasK-15
in: Toolset Professional Support
Quick solution available
Problem:
The issue here is that the user is unable to specify a file field as a link for the dynamic button block
Solution:
This is a known issue by our developers and they are working to resolve the issue. This fix should be available in a future release
2
5
4 years, 7 months ago
andreasK-15
Split: Adding a search field with autocomplete in views
Started by: Shukla
in: Toolset Professional Support
2
2
4 years, 7 months ago
Waqar
Fields and Text content should be centered
Started by: PatrickL9162
in: Toolset Professional Support
2
2
4 years, 7 months ago
Waqar
I want to translate the content templates
Started by: victorC-9
in: Soporte profesional de Toolset
2
4
4 years, 7 months ago
Christian Cox
Hiding Toolset WYSIWYG field editor buttons from my editors in wp-admin
Started by: l.f.A
in: Toolset Professional Support
Quick solution available
Problem: I would like to hide the Toolset toolbar buttons above WYSIWYG editor panels in wp-admin for certain User roles.
Solution: You can use the following code snippet to manage the visibility of these buttons in wp-admin:
function tssupp_remove_admin_toolset_buttons(){
$user = wp_get_current_user();
if ( is_admin() && !in_array( 'administrator', (array) $user->roles ) ) {
add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
}
}
add_action( 'admin_init','tssupp_remove_admin_toolset_buttons', 9 );
Only administrators will see these buttons, but you can adjust the code to support other roles as well.
2
4
4 years, 7 months ago
Christian Cox
Problem when hiding elements to create the responsive version of a website
Started by: avansisI-2
in: Toolset Professional Support
2
2
4 years, 7 months ago
Shane
Best way to exclude single items from Search inputs
Started by: smileBeda
in: Toolset Professional Support
2
4
4 years, 7 months ago
smileBeda