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
Root url for website | |
--------------------------------------------------------- | |
<?php site_url(); ?> | |
<?php bloginfo('url'); ?> | |
title of specific post/page | |
--------------------------------------------------------- | |
<?php wp_title(); ?> | |
Site Home URL |
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 | |
/* ----------------------------------------------------------------------------- | |
* Helper Function | |
* -------------------------------------------------------------------------- */ | |
if ( ! function_exists( 'omc_get_option' ) ) { | |
/** | |
* Proxy Function | |
*/ | |
function omc_get_option( $opt_name, $default = null ) { |
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
#stop directory browsing | |
Options All -Indexes | |
# SSL Https active Force non-www | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$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
header.php - header section | |
index.php - main section | |
sidebar.php - sidebar section | |
footer.php - footer section | |
single.php - post template | |
page.php - page template | |
comments.php - comments template | |
search.php - search content | |
searchform.php - search form | |
archive.php - archive |
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
the_post_thumbnail(); // Without parameter ->; Thumbnail | |
the_post_thumbnail( 'thumbnail' ); // Thumbnail (default 150px x 150px max) | |
the_post_thumbnail( 'medium' ); // Medium resolution (default 300px x 300px max) | |
the_post_thumbnail( 'medium_large' ); // Medium-large resolution (default 768px x no height limit max) | |
the_post_thumbnail( 'large' ); // Large resolution (default 1024px x 1024px max) | |
the_post_thumbnail( 'full' ); // Original image resolution (unmodified) | |
the_post_thumbnail( array( 100, 100 ) ); // Other resolutions (height, width) | |
add_image_size( 'category-thumb', 300, 9999 ); // 300 pixels wide (and unlimited height) |
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 ( have_posts() ) : ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | |
<div class="post-header"> | |
<div class="date"><?php the_time( 'M j y' ); ?></div> | |
<h2><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> | |
<div class="author"><?php the_author(); ?></div> | |
</div><!--end post header--> | |
<div class="entry clear"> | |
<?php if ( function_exists( 'add_theme_support' ) ) the_post_thumbnail(); ?> |
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 | |
/*this is for init default jquery*/ | |
function various_theme_jquery() { | |
wp_enqueue_script('jquery'); | |
} | |
add_action('init', 'various_theme_jquery'); | |
/*this is to enqueue js and css*/ |
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 | |
//**php for dynamic title***************************************************************************// | |
<title><?php bloginfo('name'); ?></title> | |
///***php for images and jequery slider******************************************************// | |
<?php echo get_template_directory_uri(); ?>/ | |
//php for css***********************************************// |