This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| body:not(.elementor-editor-active) .hide-listing { | |
| display: none; | |
| height: 0; | |
| } | |
| </style> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* Add this to functions.php or using a code snippet plugin */ | |
| add_action( 'jet-engine/register-macros', function(){ | |
| /** | |
| * Return current object property. | |
| */ | |
| class Current_Object_Prop_Macro extends \Jet_Engine_Base_Macros { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jQuery(document).ready(function($) { | |
| // Listen for the JetFormBuilder submit success event | |
| $(document).on('jet-form-builder/ajax/on-success', function() { | |
| // Wait for 2 seconds after the form is successfully submitted | |
| setTimeout(function() { | |
| // Simulate a click on the popup close button | |
| $('.jet-popup__close-button').trigger('click'); | |
| }, 2000); // Time in milliseconds (2 seconds) | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Change for the Option you want. | |
| // Can be seen on the URL when you enter on the option page: https://yoursite.com/wp-admin/admin.php?page=example-option | |
| $option_name = 'example-option'; | |
| // Get the options page values | |
| $options = get_option($option_name); | |
| // Update the option field with the values you want. | |
| $options['example_option_field'] = 'new value'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Put this on your functions.php */ | |
| add_filter( 'jet-smart-filters/filters/localized-data', 'translate_datepicker_texts', 100 ); | |
| function translate_datepicker_texts( $args ) { | |
| if ( isset( $args['datePickerData'] ) ) { | |
| // Substitui os textos em inglês pelas traduções para português brasileiro. | |
| $args['datePickerData']['closeText'] = 'Fechar'; | |
| $args['datePickerData']['prevText'] = 'Anterior'; | |
| $args['datePickerData']['nextText'] = 'Próximo'; | |
| $args['datePickerData']['currentText'] = 'Hoje'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This will return the glossary items as a value:label array */ | |
| jet_engine()->glossaries->filters->get_glossary_options( $glossary_id ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* By Victor Pietro (nectho) | |
| This is the easiest way that I've found to redirect user to a CCT Single Page after the user has created this CCT with a form from JetFormBuilder. | |
| 1. First, on the form you have to set a post-submit action to redirect user to a page. | |
| 2. Then, set Custom URL, and on Redirect URL, put an existent page (or for an existing CPT). In this example, I'll use /consultation/ | |
| 3. For URL Query Arguments, add the inserted_cct field (on my example, the CCT is consultation, so I add inserted_cct_consultation) | |
| 4. Now on your functions.php (if you have a Child theme installed), or with a code snippet plugin, you just put the function below. | |
| 5. You have to adjust the function. On /consultation/, put the page you've put on form post-submit action | |
| 6. You also have to change the isset( $_GET['inserted_cct_consultation'] ) part to the inserted_cct of your CCT. |
NewerOlder