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
set $domain_dir parahitatour-com; | |
set $cache_path /wp-content/cache/rapid-cache/cache/https/$domain_dir; | |
location ~ ^(?<filename>/.+)/$ { | |
sub_filter '<!--headers' ' '; | |
sub_filter 'a:' '<!-- a:'; | |
try_files $uri $uri/ $cache_path/$filename.html /index.php$args; | |
} | |
location = / { |
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
# ... | |
#comet cache config, exclude wp-admin | |
location ~ ^/(?!(wp-admin)) { | |
etag on; | |
expires 7d; | |
if_modified_since before; | |
gzip on; | |
gzip_vary on; |
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 | |
function custom_loginlogo() { | |
echo '<style type="text/css"> | |
.login h1 a {background-image: url('.wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'large', false )[0] | |
.') !important; | |
pointer-events: none; | |
background-size: contain; | |
height: 100px; | |
font-size: inherit; | |
width: auto; |
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 | |
function custom_rewrite_rule() { | |
$cat_base = ltrim(get_option('category_base'),'/').'/'; | |
$rewrites = Array( | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/?$'=>'index.php?attachment=$matches[1]', | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/trackback/?$'=>'index.php?attachment=$matches[1]&tb=1', | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/feed/(feed|rdf|rss|rss2|atom)/?$'=>'index.php?attachment=$matches[1]&feed=$matches[2]', | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/(feed|rdf|rss|rss2|atom)/?$'=>'index.php?attachment=$matches[1]&feed=$matches[2]', | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/comment-page-([0-9]{1,})/?$'=>'index.php?attachment=$matches[1]&cpage=$matches[2]', | |
$cat_base.'(.+?)/[^/]+/attachment/([^/]+)/embed/?$'=>'index.php?attachment=$matches[1]&embed=true', |
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 | |
$perpage = 12; | |
$arg = Array( | |
'posts_per_page'=> $perpage, | |
'post_type'=>'product', | |
'paged'=> $paged | |
); | |
$query = new WP_Query($arg); | |
$numrows = $query->found_posts; | |
if($query->have_posts()) |
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
test file 1 |
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
/** | |
* Laod large image at last. | |
* requires jQuery | |
* @author: takien | |
*/ | |
jQuery(document).ready(function($){ | |
$('img').each(function(){ | |
var hires = $(this).data().src; | |
if((hires != undefined) && (hires != '')){ | |
$(this).attr('src',hires); |
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 | |
/* | |
* taxonomy orderby latest post | |
* add new arg for taxonomy (include category), | |
* orderby=latest_post | |
* @author: takien.com | |
* the original version by http://jeffry.net (only for category) | |
*/ | |
function filter_term_sort_by_latest_post_clauses( $pieces, $taxonomies, $args ) { | |
global $wpdb; |
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
/*static.js | |
* @author: takien | |
* @link: http://takien.com | |
* static element uses jQuery, no CSS required. | |
* Usage: add class 'element-static' to your element to make it static | |
*/ | |
jQuery(document).ready(function($){ | |
function element_static(scroll){ | |
$('.element-static').each(function() { |
NewerOlder