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 | |
// http://fellowtuts.com/wordpress/bootstrap-3-pagination-in-wordpress/ | |
if (function_exists("wp_bs_pagination")) | |
{ | |
//wp_bs_pagination($the_query->max_num_pages); | |
wp_bs_pagination(); | |
} | |
?> | |
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 | |
$args = array( | |
'post_type' => 'special-offers-cpt', | |
'post_status' => 'publish', | |
'posts_per_page' => -1 | |
); | |
// The query | |
$child_query = new WP_Query($args); |
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
$('a#footer-icon').click(function(e) { | |
e.preventDefault(); | |
var $t = $('#footer .bottom'); | |
if ($t.is(':visible')) { | |
$t.slideUp(400); | |
} else { | |
$t.slideDown(400); | |
$("html, body").animate({ scrollTop: $(document).height() }, 1000); |
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
HCV | |
HTML - add data-attribute(clicked-node) to each photo with counter. | |
jQuery | |
// PhotoSwipe | |
$(".grid-item img").click(function(e) { | |
e = e || window.event; | |
e.preventDefault ? e.preventDefault() : e.returnValue = false; |
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 | |
// If needed to get a specific category | |
// echo "<pre>"; | |
// var_dump($wp_query->query_vars); | |
// echo "</pre>"; | |
// echo $wp_query->query_vars['gallery-category']; | |
$args = array( | |
'post_type' => 'gallery', |
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', |
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
<!-- 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
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
http://xxx.com/race-results/?series=Attachment_Name_Here.html | |
if( isset( $_GET['series'] ) ) { | |
function get_attachment_url_by_slug( $slug ) { | |
$args = array( |