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
<body | |
<?php | |
if( is_singular('things_to_do') ) { | |
// allows us to add taxonomy term to body class | |
$things_to_do_queried_object = get_queried_object(); | |
$terms = get_the_terms( $things_to_do_queried_object->ID, 'things_to_do_type' ); | |
if ( $terms && ! is_wp_error( $terms ) ) : | |
$draught_links = array(); |
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
category.php | |
<?php | |
$homepg=get_bloginfo('url')."/news-notices/news/"; | |
header("Location: $homepg",TRUE,301); | |
// http://websistent.com/redirect-wordpress-archives/ | |
// Redirect unused category page to news page. | |
?> |
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
// http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-wordpress-widget/ | |
// | |
// Select a Restaurant | |
class eoc_widget_select_restaurant extends WP_Widget { | |
function __construct() { | |
parent::__construct( | |
// Base ID of your widget | |
'eoc_widget_select_restaurant', |
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
# initializr | |
# ###################################################################### | |
# # WEB PERFORMANCE # | |
# ###################################################################### | |
# ---------------------------------------------------------------------- | |
# | Compression | | |
# ---------------------------------------------------------------------- |
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
query_posts( $query_string . '&posts_per_page=-1' ); | |
if (have_posts()): while (have_posts()) : the_post(); ?> |
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 | |
<?php | |
$rows_pgr = get_field('property_gallery_repeater'); | |
if($rows_pgr) { | |
echo " | |
<div class='gallery'>"; | |
echo " <div id='property_gallery_container' class='grid' itemscope itemtype='http://schema.org/ImageGallery'>"; |
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
http://snipplr.com/view.php?codeview&id=70656 | |
# First: | |
DELETE FROM wp_postmeta | |
WHERE post_id IN | |
( | |
SELECT id | |
FROM wp_posts | |
WHERE post_type = 'attachment' |
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 method - Start | |
// function get_json( $url, $arg ) { | |
// //GET remote site | |
// $response = wp_remote_get( $url, $arg ); | |
// //Checking for errors | |
// if ( is_wp_error( $response ) ) { | |
// return sprintf( 'Your URL %1s could not be retrieved', $url ); |
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
$("img.lazy").lazyload({ | |
effect : "fadeIn", | |
threshold : 200, | |
event : "sporty" | |
}); | |
$('#order_az').click(function() { | |
$("img.lazy").trigger('sporty'); | |
}); |
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_meta_box('nme_pro_reviews_box', 'Property Reviews', 'nme_pro_reviews_box', 'property', 'normal', 'high'); | |