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 | |
hm_add_rewrite_rule( | |
array( | |
'rewrite' => '^login/?$', | |
'template' => 'templates/login.php', | |
'query' => 'posts_per_page=1', | |
'title_callback' => function() { | |
return 'Login | ' . get_bloginfo( 'title' ); | |
}, | |
'post_query_properties' => array( 'is_home' => false, 'is_page' => false, 'login' => true ), |
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 | |
function get_items_by_ids( $post_type = 'post', $post_ids = '' ) { | |
$items = new WP_Query([ | |
'post_status' => 'publish', | |
'post_type' => $post_type, | |
'showposts' => 100, | |
'post__in' => $post_ids, | |
'orderby' => 'post__in', |
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 | |
// parts/results/filters | |
?> | |
<div class="filters"> | |
<div class="facets"> | |
<h3>Category</h3> | |
<?php echo facetwp_display( 'facet', 'categories' ); ?> |
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 get_header(); ?> | |
<?php get_template_part( 'parts/header/archive' ); ?> | |
<div class="container"> | |
<section class="listings"> | |
<div class="facetwp-template"> |
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 | |
$args = array( | |
'posts_per_page' => 5, | |
'orderby' => 'post_title', | |
'order' => 'ASC', | |
'post_type' => 'tour', | |
'post_status' => 'publish', | |
'paged' => $paged | |
); |
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 | |
/** | |
* Add custom member role, created with the same capability as customer. | |
*/ | |
function courtauld_add_member_role() { | |
if ( true == get_option( 'member_role_added_7_oct' ) ) { | |
return; | |
} |
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 | |
class Order { | |
public $_order; | |
public function __construct( $order_id ) { | |
if ( empty( $order_id ) ) { | |
throw new Exception( '$order_id empty' ); |
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 if($post_fields['places_of_interest']): ?> | |
<h2>Places of Interest</h2 | |
<?php echo $post_fields['places_of_interest_introduction']; ?> | |
<?php | |
foreach($post_fields['places_of_interest'] as $post): | |
setup_postdata($post); |
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 | |
function exp_add_notifications( $post_id, $post ) { | |
if ( 'auto-save' == $post->post_status || 'auto-draft' == $post->post_status ) { | |
return; | |
} | |
$message = get_the_title( $post_id ) . ' was added.'; |