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 | |
query_posts("posts_per_page=3&cat=5&paged=".$paged); ?> | |
<?php if ( have_posts () ) : while (have_posts()):the_post(); ?> | |
<?php endwhile; ?> | |
///Pagination code here. | |
<?php else : ?> | |
<?php endif; ?> | |
<?php wp_reset_query(); ?> |
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 ( get_query_var('paged') ) { $paged = get_query_var('paged'); } | |
elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } | |
else { $paged = 1; } | |
query_posts("posts_per_page=3&cat=5&paged=".$paged); ?> | |
<?php if ( have_posts () ) : while (have_posts()):the_post(); ?> | |
<?php endwhile; ?> | |
///Pagination code here. | |
<?php else : ?> | |
<?php endif; ?> |
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 | |
$con = mysql_connect('localhost', 'root', '1234'); | |
if (!$con) { | |
exit('Cannot connect database.'); | |
} | |
$result = mysql_select_db('phpdb', $con); | |
if (!$result) { | |
exit('Cannot select database.'); | |
} | |
$result = mysql_query('SET NAMES utf8', $con); |
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
1. Open "php.ini" in "C:\xampp\php\" directory. | |
2. Enable the following codes by removing ";". | |
;mbstring.language = Japanese | |
;mbstring.internal_encoding = EUC-JP | |
;mbstring.http_input = auto | |
;mbstring.http_output = SJIS | |
;mbstring.encoding_translation = Off | |
;mbstring.detect_order = auto | |
;mbstring.substitute_character = none |
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
1. Open "my.ini" in "C:\xampp\mysql\bin\" directory. | |
2. Edit the following lines. | |
# Add the following code before [client]. | |
default-character-set=utf8 | |
# Add the following code before [mysqld]. | |
character-set-server=utf8 | |
skip-character-set-client-handshake |
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( is_page('PAGE ID') || is_page('PAGE ID') || is_page('PAGE ID') ): ?> | |
<?php endif; ?> |
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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www.sample\.com | |
RewriteRule ^(.*)$ http://sample.com/$1 [R=301,L] |
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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^sample\.com | |
RewriteRule ^(.*)$ http://sample.com/$1 [R=301,L] |
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_password_required( $post->ID ) ) : ?> | |
<?php else: ?> | |
<?php echo get_the_password_form(); ?> | |
<?php endif;?> |
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 $(document).ready(function(){ | |
// insert coding here | |
}); ?> |
OlderNewer