Cesar
Fils de soutien créés au cours des 30 derniers jours : 0
Sujets de forum favoris
This user has no favorite topics.
Sujets de forum créés
Status | Sujet | Supporter | Voix | Publications | Nouveauté |
---|---|---|---|---|---|
Counter variable when using wpv-for-each
Commencé par : 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 | Il y a 3 années et 10 mois | ||
Create slider from repeatable field
Commencé par : Cesar in: Chat Support |
1 | 2 |
Il y a 3 années et 10 mois
|
||
Change default color palette in Toolset Blocks
Commencé par : Cesar in: Chat Support |
1 | 2 |
Il y a 4 années
|
||
Next and Previous custom links for CPT is not working as expected
1
2
Commencé par : Cesar in: Toolset Professional Support |
2 | 27 | Il y a 5 années et 5 mois | ||
Under a multisite setup I can’t see custom fields on my custom post types
Commencé par : Cesar
in: Soporte profesional de Toolset
Problem: Solution: |
2 | 6 | Il y a 5 années et 6 mois | ||
Filter a custom field with a range of numbers
Commencé par : 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 | Il y a 5 années et 7 mois | ||
I need to know what are your plans for Divi
Commencé par : Cesar in: Soporte profesional de Toolset |
2 | 5 | Il y a 5 années et 9 mois | ||
Use default WP Post Editor with a view Template (Divi Theme)
Commencé par : Cesar in: Soporte profesional de Toolset |
2 | 12 | Il y a 6 années et 5 mois | ||
Hide Template Layout selection for non Admin
Commencé par : Cesar
in: Toolset Professional Support
Problem: You can find proposed solution, in this case, with the following reply: Relevant Documentation: |
2 | 7 | Il y a 6 années et 8 mois | ||
Promp to create a new Layout when Updating my CPT
Commencé par : 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 | Il y a 6 années et 8 mois | ||
Filtering Artist by selecting the first letter of the title
Commencé par : Cesar
in: Toolset Professional Support
Problem: Solution: You can find proposed solution with the following reply: Relevant Documentation: |
2 | 7 | Il y a 6 années et 10 mois | ||
Dsiplaying brother page
Commencé par : 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 | Il y a 6 années et 10 mois | ||
Error during the installer
Commencé par : Cesar in: Toolset Professional Support |
2 | 3 | Il y a 6 années et 11 mois | ||
Toolset and the WP-API
Commencé par : Cesar in: Soporte profesional de Toolset |
2 | 2 | Il y a 7 années | ||
Display a filtrable list of users
Commencé par : Cesar in: Toolset Professional Support |
3 | 6 | Il y a 7 années |