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
//TOGGLE FONT AWESOME ON CLICK | |
$('.example-class').click(function(){ | |
var collapsed=$(this).find('i').hasClass('font-awesome-icon-1'); | |
$('.example-class').find('i').removeClass('font-awesome-icon-2'); | |
$('.example-class').find('i').addClass('font-awesome-icon-1'); | |
if(collapsed) | |
$(this).find('i').toggleClass('font-awesome-icon-1 font-awesome-icon-2') | |
}); |
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
//PLACE THIS CODE WITHIN YOUR FUNCTIONS.PHP FILE | |
// REMOVE WP EMOJI | |
remove_action('wp_head', 'print_emoji_detection_script', 7); | |
remove_action('wp_print_styles', 'print_emoji_styles'); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); |
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 | |
//Wordpress Fluid Images Bootstrap 4.0.0-alpha.4 | |
function bootstrap_fluid_images( $html ){ | |
$classes = 'img-fluid'; // Bootstrap 4.0.0-alpha.4 | |
// check if there are already classes assigned to the anchor | |
if ( preg_match('/<img.*? class="/', $html) ) { | |
$html = preg_replace('/(<img.*? class=".*?)(".*?\/>)/', '$1 ' . $classes . ' $2', $html); | |
} else { | |
$html = preg_replace('/(<img.*?)(\/>)/', '$1 class="' . $classes . '" $2', $html); |
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
/* Vertical Carousel for Bootstrap 4 Alpha 6 */ | |
.vert .carousel-item-next.carousel-item-left, | |
.vert .carousel-item-prev.carousel-item-right { | |
-webkit-transform: translate3d(0, 0, 0); | |
transform: translate3d(0, 0, 0); | |
} | |
.vert .carousel-item-next, | |
.vert .active.carousel-item-right { | |
-webkit-transform: translate3d(0, 100%, 0); |
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
//The correct way to call an include file from within a custom template | |
<?php include get_template_directory() . '/inc/example_inc.php'; ?> |
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
<div id="post-<?php the_ID(); ?>" class="carousel slide" data-ride="carousel" data-interval="<?php echo rand(4500, 6000); ?>"> | |
<div class="carousel-inner" role="listbox"> | |
<div class="carousel-item active"> | |
<img class="d-block img-fluid" src="..." alt="First slide"> | |
</div> | |
<div class="carousel-item"> | |
<img class="d-block img-fluid" src="..." alt="Second slide"> | |
</div> | |
<div class="carousel-item"> | |
<img class="d-block img-fluid" src="..." alt="Third slide"> |
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
<div id="myCarousel" class="carousel slide" data-ride="carousel"> | |
<!-- Indicators --> | |
<ol class="carousel-indicators"> | |
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> | |
<li data-target="#myCarousel" data-slide-to="1"></li> | |
<li data-target="#myCarousel" data-slide-to="2"></li> | |
</ol> | |
<div class="carousel-inner" role="listbox"> | |
<div class="item active"> | |
<img class="first-slide" src="#" alt="First slide"> |
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
// ADD IMAGE, TEXT, and URL (Heading, Subtext, Link) TO FIRST IMAGE IN SEQUENCE -- WP THEME CUSTOMIZER | |
function theme_slug_home_img_slide_1( $wp_customize ) { | |
$wp_customize->add_section( | |
'home_slide_img_one', | |
array( | |
'title' => 'Home Image Slide 1', | |
'description' => 'This section updates all information pertaining to the first image in the slideshow on the home page', | |
'priority' => 1, | |
)); |
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
$wp_customize->add_setting( 'theme_slug_slide_img_upload_one' ); | |
$wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize,'theme_slug_slide_img_upload_one', array( | |
'label' => __( 'Upload image for first slide in sequence:', 'theme_slug' ), | |
'section' => 'home_slide_img_one', | |
'settings' => 'theme_slug_slide_img_upload_one', | |
'description' => 'Upload your first slider image here.' | |
))); |
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
$wp_customize->add_setting( 'theme_slug_slide_title_1', array( | |
'default' => 'No Title Text Has Been Entered', | |
'sanitize_callback' => 'sanitize_headline_one_text', | |
)); | |
function sanitize_headline_one_text( $input ) { | |
return wp_kses_post( force_balance_tags( $input ) ); | |
} | |
$wp_customize->add_control( 'theme_slug_slide_title_1', array( | |
'type' => 'text', | |
'label' => __( 'Heading Text Here:', 'theme_slug' ), |
OlderNewer