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 | |
//Insert Thumbnail After First Paragraph | |
add_filter( 'the_content', 'joy_insert_featured_image', 20 ); | |
function insert_featured_image( $content ) { | |
$content = preg_replace( "/<\/p>/", "</p>" . get_the_post_thumbnail($post->ID, 'post-single'), $content, 1 ); | |
return $content; | |
} | |
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
A Fix for now: | |
Remove the link from the button, icon or text | |
Add an ID to the element you want to trigger your pop-up with | |
Go to Pop-up settings > Advanced > Open By Selector | |
Fill in your selector (with an ID add # in front of it) | |
This will remove the tag to the trigger, so scrapers won't see an invalid link anymore. |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
//CSS | |
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
selector .elementor-image img { | |
border-radius: 10px 10px 10px 10px; | |
width: 400px; | |
height: 235px; | |
max-width: 100%; | |
object-fit: cover; | |
overflow: hidden; | |
} |
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
/* START - Pull First Image as Featured Image if Featured Image is NA */ | |
function crowwwn_auto_featured_image() { | |
global $post; | |
if (!has_post_thumbnail($post->ID)) { | |
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" ); | |
if ($attached_image) { | |
foreach ($attached_image as $attachment_id => $attachment) { | |
set_post_thumbnail($post->ID, $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
//Set Element ID to "stickycrowwwn" | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
jQuery(function($){ | |
var mywindow = $(window); | |
var mypos = mywindow.scrollTop(); | |
mywindow.scroll(function() { | |
if (mypos > 40) { | |
if(mywindow.scrollTop() > mypos) { |
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
/* Quick Use */ | |
/* Section */ | |
selector .elementor-container .elementor-row { | |
flex-wrap: wrap; | |
} | |
/* Column */ | |
selector { | |
width: 100%; | |
} |
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_filter( 'get_the_excerpt', 'replace_post_excerpt_crowwwn' ); | |
function replace_post_excerpt_crowwwn($output) | |
{ | |
$output=get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true); | |
if ($output == !NULL) { | |
return $output; | |
} | |
else { | |
$content = get_the_content(); | |
return wp_trim_words( $content , '27' ); |
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 upload_svg_files( $allowed ) { | |
if ( !current_user_can( 'manage_options' ) ) | |
return $allowed; | |
$allowed['svg'] = 'image/svg+xml'; | |
return $allowed; | |
} | |
add_filter( 'upload_mimes', 'upload_svg_files'); |