woocommerce product native taxonomies can’t make hierarchical
Started by: filipV-3
in: Toolset Professional Support
Quick solution available
Problem: I would like to use a select field to display Product Categories in a CRED form that creates WooCommerce Products, but I can only choose checkboxes.
Solution: Modify the CRED field shortcode to use type "select" and single_select "true".
[cred_field field='product_cat' display='select' single_select='true' output='bootstrap']
Relevant Documentation: https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
2
6
6 years, 8 months ago
Christian Cox
sort posts by quantity of children
Started by: mike capson
in: Toolset Professional Support
Quick solution available
2
3
6 years, 8 months ago
mike capson
How to display thumbnails of of PDFs uploaded to the Types document field
Started by: Price
in: Toolset Professional Support
Quick solution available
Problem:
How to display thumbnail images of PDF files which are uploaded using the Types document field?
Solution:
1. Please add this code in your theme’s or child theme’s functions.php file:
function getPDFimg($atts) {
extract( shortcode_atts( array(
'size'=>'full',
), $atts ) );
$image_url = str_replace(".pdf", ".jpg", types_render_field( "publication_document")); // publication_document = your field name
$dirname = str_replace('.jpg','',str_replace(home_url('/'),'',$image_url));
$images = glob($dirname."*.jpg");
if(isset($images[0])){
$small_image = home_url('/').$images[0];
}
if(isset($images[1])) {
$medium_image = home_url('/').$images[1];
}
if(isset($images[2])) {
$large_image = home_url('/').$images[2];
}
switch($size) {
case 'small':
if(isset($small_image) && $small_image != '' ) {
$image_src = $small_image;
}
else{
$image_src = $image_url;
}
break;
case 'medium':
if(isset($medium_image) && $medium_image != '' ) {
$image_src = $medium_image;
}
else{
$image_src = $image_url;
}
break;
case 'large':
if(isset($large_image) && $large_image != '' ) {
$image_src = $large_image;
}
else{
$image_src = $image_url;
}
break;
default:
$image_src = $image_url;
}
return '<img src=' .$image_src . ' class="pubdoc-pdf-image"> ';
}
add_shortcode('getpublicationpdfimg', 'getPDFimg');
==> Whereas replace “publication_document” with your field name slug.
2. Then use this shortcode and you can mention size like = small / medium / large:
[getpublicationpdfimg size="small"]
3
7
6 years, 8 months ago
Alan
Google API and Toolset Maps does not work
Started by: Matthew
in: Toolset Professional Support
Quick solution available
3
10
6 years, 9 months ago
corineV