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 | |
add_action( 'admin_init', 'my_theme_custom_theme_options', 1 ); | |
function my_theme_custom_theme_options() { | |
$saved_settings = get_option( 'option_tree_settings', array() ); | |
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
Homepage only data with default data =============== | |
<?php if( is_home() || is_front_page() ) : ?> | |
<!-- Homepage Only Code --> | |
<?php else : ?> | |
<!-- Other Page Code --> | |
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
jQuery(".all_slides").owlCarousel({ | |
singleItem: true, | |
pagination: false, | |
autoPlay: 5000, | |
theme: "homepage-slider-arrows", | |
navigation: true, | |
addClassActive: true, | |
transitionStyle : "fade", | |
navigationText: ["<i class='fa fa-angle-left'></i>","<i class='fa fa-angle-right'></i>"], | |
afterMove: previousslide, |
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 | |
$temp = $wp_query; | |
$wp_query = null; | |
$wp_query = new WP_Query(); | |
$wp_query->query('showposts=6&post_type=posttype&orderby=menu_order&order=ASC'.'&paged='.$paged); | |
while ($wp_query->have_posts()) : $wp_query->the_post(); | |
?> | |
<?php |
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 | |
global $post; | |
$number = 0; | |
$args = array( 'posts_per_page' => -1, 'post_type'=> 'posttype', 'orderby' => 'menu_order', 'order' => 'ASC' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<li data-target="#myCarousel" data-slide-to="<?php echo $number++; ?>"></li> | |
<?php endforeach; ?> |
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
$(window).scroll(function() { | |
if ($(window).scrollTop() > 100) { | |
$('.main_h').addClass('sticky'); | |
} else { | |
$('.main_h').removeClass('sticky'); | |
} | |
}); | |
if you want to add stick menu on custom div scroll===== |
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
Redirect to custom page when user logged in================== | |
function login_redirect( $redirect_to, $request, $user ){ | |
return home_url('custom-page-url-extension'); | |
//Custom page url extension where want redirect | |
} | |