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
/** | |
* add toggle control to star rating widget for schema | |
**/ | |
add_action( 'elementor/element/star-rating/section_rating/before_section_end', function( $element, $args ) { | |
$element->add_control( | |
'use_schema', | |
[ | |
'type' => \Elementor\Controls_Manager::SWITCHER, | |
'label' => __( 'Use Schema', 'elementor' ), | |
'label_on' => __( 'Enable', 'elementor' ), |
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
//detects the start of an ajax request being made | |
$(document).on("sf:ajaxstart", ".searchandfilter", function(){ | |
console.log("ajax start"); | |
}); | |
//detects when the ajax request has finished and the content has been updated | |
// - add scripts that apply to your results here | |
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){ | |
console.log("ajax complete"); | |
//so load your lightbox or JS scripts here again |
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
<hr /> | |
<div class="row"> | |
<div class="col-md-4"> | |
[text* your-name class:form-control placeholder "Name (required)"] | |
</div> | |
<div class="col-md-4"> | |
[email* your-email class:form-control placeholder "Email (required)"] |
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
$gravity_form_id = 6; // gravity form id, or replace {$gravity_form_id} below with this number | |
add_filter("gform_after_submission_{$gravity_form_id}", 'jdn_set_post_acf_gallery_field', 10, 2); | |
function jdn_set_post_acf_gallery_field($entry, $form) | |
{ | |
$gf_images_field_id = 42; // the upload field id | |
$acf_field_id = 'field_54804833b3067'; // the acf gallery field id | |
// get post |
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
/** | |
* Be sure to include library scripts in this order. Can be placed either | |
* in the header or footer. | |
*/ | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script> |
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 | |
/* | |
* This function will get the first image in this order: | |
* | |
* 1) Featured image | |
* 2) First image attached to post | |
* 3) First image URL in the content of the post | |
* 4) YouTube screenshot | |
* 5) Default images for different categories [SET MANUALLY] |
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 | |
/* | |
Term Archive Pages: | |
- http://example.com/recipes/dinner/ | |
- http://example.com/recipes/breakfast,brunch/ | |
Single Recipe Pages: | |
- http://example.com/recipes/dinner/soup-title/ |
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
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
NewerOlder