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 | |
//option tree setup for theme option | |
//first download option tree plugin from wordpress.org then paste the folder in theme directory. | |
//copy 2 files “theme-options.php” and “meta-boxes.php” to inc folder then include. | |
add_filter( 'ot_show_pages', '__return_false' ); | |
add_filter( 'ot_show_new_layout', '__return_false' ); | |
add_filter( 'ot_theme_mode', '__return_true' ); | |
include_once( 'option-tree/ot-loader.php' ); | |
include_once( 'inc/theme-options.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
<?php | |
function ChangeSelectTitle($cat_args){ | |
$cat_args['show_option_none'] = __('USA Poker Rooms'); | |
return $cat_args; | |
} | |
add_filter('widget_categories_dropdown_args', 'ChangeSelectTitle'); | |
?> |
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 ct_paging_nav() { | |
// Don't print empty markup if there's only one page. | |
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { | |
return; | |
} | |
$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; | |
$pagenum_link = html_entity_decode( get_pagenum_link() ); | |
$query_args = 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
//on index.php right after endwhile | |
<div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div> | |
<div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div> | |
<?php else : ?> | |
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p> |
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 wpdocs_excerpt_more( $more ) { | |
return sprintf( '<a class="read-more" href="%1$s">%2$s</a>', | |
get_permalink( get_the_ID() ), | |
__( ' Read More...', 'textdomain' ) | |
); | |
} | |
add_filter( 'excerpt_more', 'wpdocs_excerpt_more' ); | |
?> |
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 ah_custom_posts() { | |
//for slider | |
register_post_type('banner',array( | |
'public' => true, | |
'label' => 'Banner', | |
'labels' => array( | |
'name' => 'Banner', | |
'singular_name' => 'Banner', | |
'add_new' => 'Add new banner', |
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 | |
add_theme_support( 'post-formats', array( 'default', 'aside', 'audio') ); | |
add_theme_support( 'post-thumbnails' ); | |
?> |
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
<div class="main-menu"> | |
<?php | |
wp_nav_menu( array( | |
'theme_location' => 'primary', | |
'menu_id' => 'menu', | |
'fallback_cb' => 'ah_fallback_menu' | |
) ); | |
?> | |
</div> |
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 ah_scripts(){ | |
//register style | |
wp_register_style( 'ah-bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.37', 'all' ); | |
wp_register_style( 'ah-slicknav', get_template_directory_uri() . '/css/slicknav.min.css', array(), '1.0.10', 'all' ); | |
wp_register_style( 'ah-font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '4.5', 'all' ); | |
wp_register_style( 'ah-google-font', 'https://fonts.googleapis.com/css?family=Titillium+Web:400,700,900', array(), '0.1', 'all' ); | |
//enqueue style | |
wp_enqueue_style( 'ah-bootstrap' ); |
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 | |
//styles and scripts | |
require_once ('inc/stsc.php'); | |
// menus | |
require_once ('inc/menus.php'); | |
//custom menu | |
require_once ('inc/custom.php'); |