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
<!-- Source: https://element.how/elementor-close-accordion-on-page-load/ --> | |
<style class="accordion-closed-on-load"> | |
body:not(.elementor-editor-active) .elementor-widget-accordion .elementor-tab-content { | |
display: none!important; | |
} | |
</style> | |
<script> | |
window.addEventListener('load', function() { | |
setTimeout(function(){ | |
document.querySelector('.accordion-closed-on-load').remove(); |
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
<script> | |
jQuery(document).ready(function () { | |
localStorage.removeItem('data-tab-index"') | |
jQuery(".child-tab .e-n-tab-title").click(function () { | |
localStorage.setItem("data-tab-index", jQuery(this).attr("data-tab")) | |
}) | |
jQuery(".parent-tab .e-n-tab-title").click(function () { |
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
function disableRightClickAndDragOnImages() { | |
// Get all images on the page | |
const images = document.getElementsByTagName('img'); | |
// Loop through the images and disable right-click and dragging on each one | |
for (let i = 0; i < images.length; i++) { | |
images[i].addEventListener('contextmenu', event => { | |
event.preventDefault(); | |
}); | |
images[i].addEventListener('mousedown', event => { |
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_action( 'rank_math/vars/register_extra_replacements', function() { | |
rank_math_register_var_replacement( | |
'state_slug', | |
[ | |
'name' => esc_html__( 'State Slug', 'rank-math' ), | |
'description' => esc_html__( 'Displays the slug of the States custom taxonomy in uppercase.', 'rank-math' ), | |
'variable' => 'state_slug', | |
'example' => 'VA', | |
], |
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 | |
function latest_posts_shortcode() { | |
// Set the transient key and expiration time | |
$transient_key = 'latest_posts'; | |
$expiration = DAY_IN_SECONDS; | |
// Define the site URL and number of posts per page | |
$site_url = 'https://example.com'; | |
$posts_per_page = 3; |
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
<!-- https://element.how/elementor-faq-with-search-filtering/ --> | |
<div class="faqContainer"> | |
<input type="text" class="faqInput" placeholder="enter keyword..."> | |
<i class="faqReset"></i> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> | |
<script> | |
document.addEventListener('DOMContentLoaded',function(){let settings={toggleOpenOnSearch:true,itemsShownByDefault:10,messages:{noMatchesFound:'No matches found',oneMatchFound:'Showing 1 item',matchesFound:function(){return`Showing ${maxDisplayLimit}of ${matches}items`},allMatchesShown:function(){return`Showing ${sortedList.length}items`},},} | |
let list=Array.from(document.querySelectorAll('.elementor-toggle .elementor-toggle-item')),filteredList=[],searchTerm,searchTerms,itemText,displayLimit=settings.itemsShownByDefault,loadMoreAmount=settings.itemsShownByDef |
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 | |
// https://wordpress.stackexchange.com/questions/66219/list-all-posts-in-custom-post-type-by-taxonomy | |
$custom_terms = get_terms('states'); | |
foreach($custom_terms as $custom_term) { | |
wp_reset_query(); | |
$args = array('post_type' => 'cities', | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'states', |
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
/*image gallery item aspect ratio square 1:1*/ | |
.pa-image-gallery-1-1 .et_pb_gallery_image { | |
padding-top: 100%; | |
display: block; | |
} | |
.pa-image-gallery-1-1 .et_pb_gallery_item img { | |
position: absolute; | |
height: 100%; |
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
memory_limit = 128M; | |
post_max_size = 64M; | |
max_execution_time = 120; | |
upload_max_filesize = 64M; | |
max_input_time = 60; | |
max_input_vars = 1000; |
NewerOlder