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 Open Graph | |
add_action('wp_head', 'fb_opengraph'); | |
function fb_opengraph() { | |
if( is_single() || is_page() ) { | |
echo ' | |
<meta property="og:title" content="Osso Restaurant - Peebles" /> | |
<meta property="og:description" content="Osso Restaurant Peebles - Michelin Bib Gourmand Winner 2011 to 2018" /> | |
<meta property="og:image" content="https://www.ossorestaurant.com/wp-content/uploads/2019/03/facebook-og-image.jpg" />'; | |
} | |
} |
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
DELETE FROM wp_posts WHERE post_type = "revision"; |
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 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
@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; | |
} | |
} |