Tcoffee
Tcoffee was established in 2012 by a group of professionals to cater 360 degree solutions for marketing and communication requirements of businesses. Tcoffee prides itself on hiring the best talent in the industry. Our team of experts strive to provide each client with highly innovative solutions and services tailored to match their customized requirements. Our success is driven by our team and their commitment. We believe our team members are our greatest asset. As a whole, we are characterized by the desire to be the best group possible, to help clients to establish their long term goals.
Support threads created in the last 30 days: 0
Favorite Forum Topics
This user has no favorite topics.
Forum Topics Created
Status | Topic | Supporter | Voices | Posts | Freshness |
---|---|---|---|---|---|
Setting a specific style for the current archive term in a WP archive view
Started by: Tcoffee in: Toolset Professional Support |
2 | 8 | 4 years, 6 months ago | ||
Unable to override default product single page
Started by: Tcoffee in: Toolset Professional Support |
2 | 3 | 4 years, 6 months ago | ||
Unable to override default WordPress taxonomy archive page
Started by: Tcoffee
in: Toolset Professional Support
Problem: Customize the "Product Taxonomy" taxonomy archive page with Toolset plugins. Solution: You can try these: Dashboard-> Toolset-> WordPress Archives, setup a WordPress Archive for taxonomy "Product Taxonomy" Relevant Documentation: |
2 | 3 | 4 years, 6 months ago | ||
Conditional output: language using polylang
Started by: Tcoffee in: Toolset Professional Support |
2 | 15 | 5 years, 1 month ago | ||
Load More button not working
Started by: Tcoffee in: Toolset Professional Support |
2 | 10 | 5 years, 2 months ago | ||
Repeating Field Group values Not getting sorted in the order added
Started by: Tcoffee
in: Toolset Professional Support
Problem: Solution: Relevant Documentation: |
2 | 3 | 5 years, 3 months ago | ||
boostrap 4 tabs not working
Started by: Tcoffee
in: Toolset Professional Support
Problem: Create bootstrap 4 tab section with Views plugin. Solution: There isn't such kind of built-in feature within Toolset Views plugin, it needs custom codes. You will need to follow the Bootstap document to setup the tabs: Relevant Documentation: |
2 | 4 | 5 years, 3 months ago | ||
Bootstrap 4 carousel with several (post) columns on each slide
Started by: Tcoffee
in: Toolset Professional Support
Problem: Solution: The Slides post type is a parent to the Display post type, where you can exactly that many Display posts to a Slide, as you will have columns in each slide. After creating the posts and connections, create a View where you query Slides, and output a raw View loop where you generate the HTML for the Bootstrap 4 slides. The loop of this view should look something like this: <wpv-loop> [wpv-item index=1] <div class="carousel-item active"> //insert Child View here </div> [wpv-item index=other] <div class="carousel-item "> //insert child view here </div> </wpv-loop> Now create another view for the Display post type, add a query filter to display the Display Posts that are a child to the post set in the parent view, and add in this View loop the HTML for EACH Display Post. This view is now inserted to the View displaying Slides. When now the slides view is inserted to a page, you'll see a slider that each slide has N columns (as many you chose to have) each displaying particular post data. Follow the thread below in detail for a real-life example with the code for the loops, particularly https://toolset.com/forums/topic/boostrap-4-carousel-is-not-working/#post-1301915 |
2 | 7 | 5 years, 3 months ago | ||
i have page where i want to list books in a boostrap tabs format
Started by: Tcoffee in: Toolset Professional Support |
2 | 3 | 5 years, 6 months ago | ||
Types Custom field values as a drop-down in contact form 7
Started by: Tcoffee
in: Toolset Professional Support
Problem: I would like to create a select field with options based on a post's custom field values, and use that field in Contact Form 7. Solution: Use get_post_meta to get all the values of the custom field for the current post, then loop over those values to build the markup for a select field. Get the colors postmeta values for this post as an array, then loop over the array items to concatenate the options. [php] global $post; $output = '<select name="color">'; $colors = get_post_meta($post->ID, 'wpcf-color', true); // 3rd param 'true' because we want an array foreach( $colors as $color) { $output .= '<option value="' . $color . '">' . $color . ' </option>'; } $output .= '</select>'; return $output; Relevant Documentation: |
2 | 4 | 6 years, 3 months ago | ||
Create a View of related posts on a taxonomy archive
Started by: Tcoffee
in: Toolset Professional Support
Problem: I would like to display a list of related posts on a taxonomy term archive. Related posts should be posts with terms that are siblings of the current archive term. Solution: function get_term_parent_func($atts) { $a = shortcode_atts( array( 'taxonomy' => '', 'return' => 'id' ), $atts ); $taxonomy = $a['taxonomy']; $parent_id = 0; if( is_tax( $taxonomy ) ) { $taxObj = get_queried_object(); $tax = isset($taxObj->taxonomy) ? $taxObj->taxonomy : 0; $term = isset($taxObj->term_id) ? $taxObj->term_id : 0; $parent_slugs = get_term_parents_list( $term, $tax, array('format'=>'slug', 'link'=>FALSE, 'inclusive'=>FALSE, 'separator'=>',')); $parent_slugs = explode(',', $parent_slugs); $depth = sizeof($parent_slugs) - 1; $parent_slug = ($depth === 0) ? $taxObj->slug : $parent_slugs[$depth-1]; if( $a['return'] == 'id' ) { $parent = get_term_by( 'slug', $parent_slug, $tax ); $parent_id = isset($parent->term_id) ? $parent->term_id : $taxObj->term_id; return $parent_id; } if( $a['return'] == 'slug' ) { return $parent_slug; } } return $parent_id; } add_shortcode("get_term_parent", "get_term_parent_func"); - Pass that value into your View of posts as a shortcode attribute: [wpv-view name="products-in-parent-term" wpvproductcat="[get_term_parent taxonomy='product_cat' return='slug']"] - Register the get_term_parent shortcode in Toolset > Settings > Third party shortcode arguments add_filter( 'wpv_filter_query', 'not_this_term_filter',99,3 ); function not_this_term_filter( $query_args, $views_settings, $view_id) { $view_ids = array( 1234 ); $tax = 'product-categories'; $taxObj = get_queried_object(); $tax = isset($taxObj->taxonomy) ? $taxObj->taxonomy : 0; $term_id = isset($taxObj->term_id) ? $taxObj->term_id : 0; if (in_array($view_id, $view_ids)){ $query_args['tax_query'][] = array( 'taxonomy' => $tax, 'field' => 'id', 'terms' => $term_id, 'operator' => 'NOT IN' ); } return $query_args; } Relevant Documentation: |
2 | 9 | 6 years, 3 months ago | ||
how to create different Taxonomy archive page for parent & child taxonomy terms
Started by: Tcoffee
in: Toolset Professional Support
Problem: I would like to display archives differently for terms at different levels of hierarchy. For top-level terms, I would like to display archive style A, for second-level (child) terms archive style B, for third-level (grandchild) terms archive style C. Solution: I think it would be best to set up multiple WordPress Archives. In the "Loops selection" section of these WP Archives, do not select anything. In the Loop Editor of each WordPress Archive, you will create one of the 3 different designs. The first one can be for the parent terms, and it will not include anything in the wpv-loop tags, because you do not want to display posts. Create a View of Product Category Taxonomy Terms, filtered by term parent, where the term parent is set by the current archive. In the Loop Output section of this View, insert a link to the term archive page. Then insert this View in the WordPress Archive you just created, somewhere outside the wpv-loop tags. Create another WordPress Archive, and insert the same View of terms outside the wpv-loop tags. Build the product loop inside the wpv-loop tags. This WP Archive will be used to display the child term archive page. Create a third WordPress Archive, and build the product loop inside the wpv-loop tags. We offer a filter called wpv_filter_force_wordpress_archive that will allow you to apply a different WordPress Archive to the current archive page, based on some criteria. I have a code snippet that can help. Add this to your child theme's functions.php file: // utility function to get the hierarchical level of some hierarchical taxonomy term function get_tax_level($id, $tax){ $ancestors = get_ancestors($id, $tax); return count($ancestors)+1; } // filter that switches wordpress archives for a specific taxonomy based on term hierarchy add_filter( 'wpv_filter_force_wordpress_archive', 'switch_tax_archive_by_level', 30, 2 ); function switch_tax_archive_by_level( $wpa_assigned, $wpa_loop ) { $wpa_to_apply = $wpa_assigned; $current_taxonomy = isset(get_queried_object()->taxonomy) ? get_queried_object()->taxonomy : null; // only for product category taxonomy if( !$current_taxonomy || $current_taxonomy != 'product_cat' ) return $wpa_to_apply; $current_term_level = get_tax_level(get_queried_object()->term_id, $current_taxonomy); if ($current_term_level == 1) { // show top-level archive $wpa_to_apply = 123; } else if ($current_term_level == 2) { // show mid-level archive $wpa_to_apply = 234; } else { // show third-level archive $wpa_to_apply = 345; } return $wpa_to_apply; } You will modify 123, 234, and 345 to match the numeric ID of the 3 WordPress Archives you want to apply to the 3 different levels of hierarchy. Level 1 corresponds to the parent term, level 2 corresponds to the child term, and level 3 corresponds to the grandchild term. Relevant Documentation: |
2 | 9 | 6 years, 3 months ago | ||
Setting a specific style for the current archive term in a View of terms
Started by: Tcoffee
in: Toolset Professional Support
Problem: I have a View of taxonomy terms displayed on my taxonomy WordPress Archive pages. I would like to highlight the current archive term in the View. Solution: Use conditional HTML to compare the current archive term slug and the slug of the current term in the loop. [wpv-conditional if="('[wpv-taxonomy-slug]' eq '[wpv-taxonomy-archive info='slug']')"] This term matches the current archive term! [/wpv-conditional] Relevant Documentation: |
2 | 3 | 6 years, 3 months ago | ||
Show term archive links on term archive
Started by: Tcoffee
in: Toolset Professional Support
Problem: I would like to display a list of term archive links on hierarchical term archive page. The list should display the parent term and any sibling terms of the current archive term. Solution: function get_term_parent_func($atts) { $a = shortcode_atts( array( 'taxonomy' => '', 'return' => 'id' ), $atts ); $taxonomy = $a['taxonomy']; $parent_id = 0; if( is_tax( $taxonomy ) ) { $taxObj = get_queried_object(); $tax = isset($taxObj->taxonomy) ? $taxObj->taxonomy : 0; $term = isset($taxObj->term_id) ? $taxObj->term_id : 0; $parent_slug = get_term_parents_list( $term, $tax, array('format'=>'slug', 'link'=>FALSE, 'inclusive'=>FALSE, 'separator'=>'')); if( $a['return'] == 'id' ) { $parent = get_term_by( 'slug', $parent_slug, $tax ); $parent_id = isset($parent->term_id) ? $parent->term_id : $taxObj->term_id; return $parent_id; } if( $a['return'] == 'slug' ) { return $parent_slug; } } return $parent_id; } add_shortcode("get_term_parent", "get_term_parent_func"); - Create the WordPress Archive for the child-level Product Category taxonomy, if it does not exist yet. [wpv-view name="product-category-sidebar" terms="[get_term_parent return='id']"] - Register get_term_parent in Toolset > Settings > Frontend Content > Third party shortcodes |
2 | 3 | 6 years, 3 months ago | ||
Creating Post Type Relationships
1
2
Started by: Tcoffee in: Toolset Professional Support |
2 | 19 | 7 years ago |