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
/** | |
* Debug Pending Updates | |
* Displays hidden plugin and theme updates on update-core screen. | |
*/ | |
function debug_pending_updates() { | |
// Rough safety nets | |
if ( ! is_user_logged_in() || ! current_user_can( 'update_plugins' ) || ! current_user_can( 'update_themes' ) ) return; | |
$output = ""; |
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
// Simple function to add a div | |
// Note, the display is set to none so it is only visible in the source code | |
function custom_stuff(){ | |
?> | |
<div style="display:none">Find this</div> | |
<?php | |
} | |
add_action('wp_footer', 'custom_stuff'); |
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
.div-to-have-overlay { | |
background: #fff; | |
height: 100%; | |
width: 100%; | |
opacity: 0.5; | |
top: 0; | |
left: 0; | |
position: absolute; | |
padding: 0; | |
transition: opacity .5s; |
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
// For Enfold copy /enfold/config-templatebuilder/avia-shortcodes/postslider.php | |
// to /child-theme/shortcodes/postslider/postslider.php | |
// Add this query | |
if (strtotime(get_the_date( "Y-m-d", $the_id )) < strtotime(date("Y-m-d"))) { | |
//Do something | |
} | |
else { | |
//Do nothing | |
} |
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 to functions.php | |
add_shortcode( 'de_shortcode', 'de_shortcode' ); | |
function de_shortcode() { | |
$buffer = '<h3>Post Titles</h3>'; | |
$q = new WP_Query(array( | |
'post_type' => 'post', | |
'posts_per_page' => 6 | |
)); | |
while ($q->have_posts()) { |
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
@media only screen and (max-width: 1170px) | |
{ | |
/*Make the programme left col become full width under 1170px*/ | |
.homepage-blog-section-left-col { | |
display:block!important; | |
width:100%!important; | |
} | |
} |
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 dynamic date in Socket Copyright | |
// Add to functions.php | |
// Place [year] in socket | |
function year_shortcode() { | |
$year = date('Y'); | |
return $year; | |
} | |
add_shortcode('year', 'year_shortcode'); |
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
.icon-colour-section li:nth-child(1) .avia-font-entypo-fontello {background-color:#03a9b5!important;} | |
.icon-colour-section li:nth-child(2) .avia-font-entypo-fontello {background-color:#6a6d71!important;} | |
.icon-colour-section li:nth-child(3) .avia-font-entypo-fontello {background-color:#b3ba93!important;} | |
.icon-colour-section li:nth-child(4) .avia-font-entypo-fontello {background-color:#b3b9ae!important;} | |
.icon-colour-section li:nth-child(5) .avia-font-entypo-fontello {background-color:#285e71!important;} |