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
function influex_elm_cnd_get_post_types() { | |
$post_types = get_post_types( array( | |
'public' => true, | |
'publicly_queryable' => true, | |
)); | |
return $post_types; | |
} | |
add_action( 'elementor/theme/register_conditions', function( $conditions_manager ) { |
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(function($){ | |
$(document).ready(function() { | |
$(function() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace("/",'') == this.pathname.replace("/",'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top |
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
// Horse Slider | |
function custom_shortcode() { | |
ob_start(); | |
$args = array( | |
'post_type' => 'product', | |
'meta_key' => '_featured', | |
'meta_value' => 'yes', | |
'posts' => -1 | |
); |
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
AVAILABLE Time Formats | |
The ISO 8601 format: var deadline = '2015-12-31'; | |
The short format: var deadline = '31/12/2015'; | |
Or, the long format: var deadline = 'December 31 2015'; | |
Each of these formats allows you to specify an exact time (in hours minutes and seconds), as well as a time zone (or an offset from UTC in the case of ISO dates). | |
For example: var deadline = 'December 31 2015 23:59:59 GMT+0200'; | |
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 | |
//Register in new Widget areas | |
function genesischild_extra_widgets() { | |
genesis_register_sidebar( array( | |
'id' => 'header-further-right', | |
'name' => __( 'Header Further Right', 'genesischild' ), | |
'description' => __( 'This is the Header Middle area', 'genesischild' ), | |
) ); | |
} |
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 | |
//* Secondary Top Header | |
genesis_register_sidebar( array( | |
'id' => 'utility-bar-left', | |
'name' => __( 'Utility Bar Left', 'theme-prefix' ), | |
'description' => __( 'This is the left utility bar above the header.', 'theme-prefix' ), | |
) ); | |
genesis_register_sidebar( array( |
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 | |
/* Template Name: Test */ | |
/** | |
* Genesis custom loop | |
*/ | |
function be_custom_loop() { | |
global $post; | |
// arguments, adjust as needed | |
$args = array( | |
'post_type' => '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
<?php | |
/* | |
Plugin Name: Press Release (Custom Post Type) | |
*/ | |
function my_custom_posttypes() { | |
$labels = array( | |
'name' => 'Press Releases', | |
'singular_name' => 'Press Release', |
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
//Divi Theme Open Accordion based on Anchor Tag | |
jQuery(function($){ | |
$(document).ready(function() { | |
var hashValue = location.hash; | |
hashValue = hashValue.replace(/^#/, ''); //Get the Hash value from URL | |
var newText = "#" + hashValue + " h5.et_pb_toggle_title"; //Concatenate the hash value to locate the toggle location | |
$(newText).click(); //Call the variable with hash and class in it | |
}); | |
}); |