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
/** | |
* Style for post pagination | |
*/ | |
.post-pagination { | |
width: 100%; | |
padding:5px; | |
height: 40px; | |
border:1px solid #fff; | |
outline: 1px solid #e3e3e3; | |
border-radius:3px; |
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
function theme_queue_js(){ | |
if ( (!is_admin()) && is_singular() && comments_open() && get_option('thread_comments') ) | |
wp_enqueue_script( 'comment-reply' ); | |
} | |
add_action('wp_print_scripts', 'theme_queue_js'); |
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(is_front_page()){ | |
$paged = ( get_query_var('page') ) ? get_query_var('page') : 1; | |
}else{ | |
$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; | |
} | |
$the_query = new WP_Query(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
<?php | |
$thumb_id = get_post_thumbnail_id(); | |
$thumb_url = wp_get_attachment_image_src($thumb_id,'thumbnail-size', true); | |
echo $thumb_url[0]; | |
?> |
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
.alignnone { | |
margin: 5px 20px 20px 0; | |
} | |
.aligncenter, | |
div.aligncenter { | |
display: block; | |
margin: 5px auto 5px 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
/* Large Devices, Wide Screens */ | |
@media only screen and (max-width : 1199px) { | |
} | |
/* Medium Devices, Desktops */ | |
@media only screen and (max-width : 991px) { | |
} |
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
/*** | |
Enable Gzip Compression | |
***/ | |
.htaccess code | |
.............. | |
***Start Bellow **** | |
AddOutputFilterByType DEFLATE text/plain |
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
************************* | |
SPEED UP WORDpRESS SITE | |
************************* | |
1. IDENTIFY PLUGINS THAT ARE SLOWING YOU DOWN | |
https://wordpress.org/plugins/p3-profiler/ | |
Use this plugins for showing how to sepped up. | |
2.Enable Gzip |
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
$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID']; | |
$template_file = get_post_meta($post_id, '_wp_page_template', TRUE); | |
if ($template_file == 'welcome.php') { | |
ot_register_meta_box( $home_page_meta_box ); | |
} | |
/* ------------------------------------------------------------- |
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 = sprintf("SELECT * | |
FROM `product` | |
WHERE `id` | |
IN ( SELECT `product_id` FROM `customar_product` WHERE `user_id`='%d' )", $_GET['id']); | |