Cesar
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 |
---|---|---|---|---|---|
Counter variable when using wpv-for-each
Started by: Cesar
in: Toolset Professional Support
Problem: I would like to output an index value when looping over a repeating field instanced with wpv-for-each. Solution: You'll need a custom shortcode to do this. Add the following custom shortcode definition in your child theme's functions.php file, or in a new snippet in Toolset > Settings > Custom Code. add_shortcode('wpv-index', function () { static $i = 0; $n = $i++; return $n; }); That will create a shortcode wpv-index, which we can use in the wpv-for-each loop to create these carousel-indicators list items. Next, use wpv-for-each to iterate over the fotografia field instances and generate the indicator list items: [wpv-for-each field='wpcf-fotografia'] <li data-target="#carousel" data-slide-to="[wpv-index]"></li> [/wpv-for-each] |
2 | 3 | 3 years, 11 months ago | ||
Next and Previous custom links for CPT is not working as expected
1
2
Started by: Cesar in: Toolset Professional Support |
2 | 27 | 5 years, 6 months ago | ||
Under a multisite setup I can’t see custom fields on my custom post types
Started by: Cesar
in: Soporte profesional de Toolset
Problem: Solution: |
2 | 6 | 5 years, 7 months ago | ||
Filter a custom field with a range of numbers
Started by: Cesar
in: Toolset Professional Support
Problem: The issue here is that the user wanted to filter their posts by a range of numbers using one filter. Example So we will have a filter that allows for the filtering of dates between those options. Solution: Example <div class="form-group"> <label>[wpml-string context="wpv-views"]Number of pages[/wpml-string]</label> [wpv-control-postmeta field="wpcf-active-year" type="select" source="custom" url_param="wpv-wpcf-active-year" values="1970-1980,1980-1990,1990-2000" display_values="1970-1980, 1980-1990,1990-2000"] </div> If your custom field is already stored like this then you won't need to go through all this above, however i'm assuming that the values are stored as individual years. Ofcourse for this to work you will need to use the hook below. Granted this will only work if you are not using the AJAX reload. add_filter('wpv_filter_query', 'search_between_numeric_func', 10, 3); function search_between_numeric_func($query, $views_setting,$view_id) { if($view_id == '614' && isset($_GET['wpv-wpcf-active-year'])) { $val = $_GET['wpv-wpcf-active-year']; $query['meta_query']= array( array( 'key' => 'wpcf-active-year', 'value' => explode("-",$val), 'type' => 'numeric', 'compare' => 'BETWEEN', ), ); } return $query; } Now everywhere you see me have wpcf-active-year you will need to replace it with the custom field slug, using the wpcf- as a prefix to the slug. From the filter fields and the hook you can see how the items line up. The wpv-wpcf-active-year is a direct reference to the url parameter for the filter shortcode. Also you need to replace the 614 with your correct view ID. You can add this custom hook to your Toolset custom code in Toolset->Settings->Custom code. |
2 | 3 | 5 years, 8 months ago | ||
I need to know what are your plans for Divi
Started by: Cesar in: Soporte profesional de Toolset |
2 | 5 | 5 years, 10 months ago | ||
Use default WP Post Editor with a view Template (Divi Theme)
Started by: Cesar in: Soporte profesional de Toolset |
2 | 12 | 6 years, 6 months ago | ||
Hide Template Layout selection for non Admin
Started by: Cesar
in: Toolset Professional Support
Problem: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 7 | 6 years, 9 months ago | ||
Promp to create a new Layout when Updating my CPT
Started by: Cesar
in: Soporte profesional de Toolset
Problem: Solution: You can use wordpress standard method: remove_meta_box() For example: remove_meta_box( 'wpddl_template', array("artistas"), 'side' ); You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 7 | 6 years, 9 months ago | ||
Filtering Artist by selecting the first letter of the title
Started by: Cesar
in: Toolset Professional Support
Problem: Solution: You can find proposed solution with the following reply: Relevant Documentation: |
2 | 7 | 6 years, 11 months ago | ||
Dsiplaying brother page
Started by: Cesar
in: Toolset Professional Support
Problem: The solution to this can be found in our documentation below. Also when it says $parent you will need to use the slug of the parent CPT so if your Parent CPT is Cars and the slug is cars then in order to get the Parent information you will need to do id='$cars' |
2 | 2 | 6 years, 11 months ago | ||
Error during the installer
Started by: Cesar in: Toolset Professional Support |
2 | 3 | 7 years ago | ||
Toolset and the WP-API
Started by: Cesar in: Soporte profesional de Toolset |
2 | 2 | 7 years, 1 month ago | ||
Display a filtrable list of users
Started by: Cesar in: Toolset Professional Support |
3 | 6 | 7 years, 1 month ago |