This file contains 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 | |
/* | |
Instructions | |
Replace YOUR_ACF_FIELD with the name of your acf select dropdown key | |
Add to functions.php or code snippets plugin | |
Forms will load sorted by Title in ASC order (A to Z) | |
This file contains 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 | |
/* | |
* Code snippet to reject login for admin/authors from the regular login url | |
* In this example, people who have edit_posts permission is require special url string to login | |
* The URL need to be: https://yourdomain.com/wp-login.php?salt=your_random_url_string | |
* For normal users they can login without the special salt | |
* But If author or admin try to login it will reject the authentication | |
* | |
*/ |
This file contains 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 | |
global $product; | |
$image_size = 'medium'; /* Image size */ | |
$attachment_ids = $product->get_gallery_image_ids(); | |
foreach( $attachment_ids as $attachment_id ) { | |
This file contains 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('.readonly').attr('readonly', 'true'); |
This file contains 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
// All styling have to be inside a class | |
(function ($) { | |
let repeaterIdName = $(".oxy-dynamic-list").find("*").attr("id"); | |
let repeaterIdCount = 1; | |
$(function () { | |
$(".oxy-dynamic-list") | |
.find("div") | |
.each(function (i) { | |
if ($(this).attr("class").includes("ct-div-block")) { | |
$(this).attr({ id: `${repeaterIdName}-${repeaterIdCount}` }); |
This file contains 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
/* | |
* JS snippet to match two fields value as same | |
* Example: Email and Confirm Email need to be same | |
* Placement: Place the following code in your form -> Settings & Integrations -> Custom CSS/JS -> Custom Javascript BOX | |
*/ | |
var $email = $form.find('input[name=email]'); // Name of the first Email Address | |
var $confirmEmail = $form.find('input[name=confirm_email]'); // Name of the Confirm Email Address | |
$confirmEmail.on('blur', function() { |
This file contains 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
$shortcodeDefaults = apply_filters('fluentform_info_shortcode_defaults', array( | |
'id' => null, // This is the form id | |
'info' => 'submission_count', // submission_count | created_at | updated_at | payment_total | |
'status' => 'all', // get submission count of a particular entry status favourites | unread | read | |
'with_trashed' => 'no', // yes | no | |
'substract_from' => 0, // [fluentform_info id="2" info="submission_count" substract_from="20"] | |
'hide_on_zero' => 'no', | |
'payment_status' => 'paid', // paid | all | pending | failed | |
'currency_formatted' => 'yes', | |
'date_format' => '' |
This file contains 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
/* I'll put here different examples of dynamic query for Oxygen repeater : | |
* - Use one of the following repeater_dynamic_query definitions | |
* in code block just BEFORE the repeater | |
* - Set the repeater custom query settings : post type, number of posts, order... | |
* - Add the remove_action in a code block AFTER the repeater | |
*/ | |
/**************************************************************************************************** | |
* Display related posts for any CPT with taxonomy: |
This file contains 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(".oxy-dynamic-list").find("*").removeAttr('id'); |
NewerOlder