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
# 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
// 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
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
<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
http://xxx.com/race-results/?series=Attachment_Name_Here.html | |
if( isset( $_GET['series'] ) ) { | |
function get_attachment_url_by_slug( $slug ) { | |
$args = 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
HTML ------ | |
NONE | |
HTML ------ | |
PHP functions.php ------ |
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
<!-- prev post next --> | |
<div class="prev_next clear"> | |
<div class="left prev"> | |
<?php | |
previous_post_link('« %link','Previous post'); | |
?> | |
</div> | |
<div class="right next"> | |
<?php | |
next_post_link('%link »','Next 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
$args = array( | |
'post_type' => 'products', | |
'post_status' => 'publish', | |
'posts_per_page' => -1 | |
); | |
$child_query = new WP_Query($args); | |
$brands_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
<section class="wrapper full taxonomy-kitchens"> | |
<div class="wrapper narrow collapse"> | |
<?php | |
$args = array( | |
'post_type' => 'photo', | |
'posts_per_page' => '15', | |
'orderby' => 'rand', |