Esempio n. 1
0
function portfolio_post_limits($limit)
{
    if (is_portfolio()) {
        $old_limit = $limit;
        $limit = get_option('portfolio_rows');
        $portfolio_layout = get_option('portfolio_layout');
        switch ($portfolio_layout) {
            case 'portfolio3':
                $limit = $limit * 2;
                break;
            case 'portfolio4':
                $limit = $limit * 3;
                break;
        }
    } elseif (is_tax('gallery')) {
        $limit = get_option('gallery_limit');
    }
    if (!$limit) {
        $limit = $old_limit;
    } elseif ($limit == '-1') {
        $limit = '18446744073709551615';
    }
    return $limit;
}
 /**
  * Retrieve the standard sidebar setted for the current page, excluding woocommerce pages.
  * 
  * @return string
  * @since 1.0.0
  */
 function yit_get_standard_corporate_sidebar()
 {
     $page = '';
     if (!is_internal()) {
         if (yit_get_option('enable-all-sidebar') == 1) {
             $page = 'all';
         } else {
             if (is_posts_page() || is_single() && get_post_type() == 'post' || is_page_template('blog.php')) {
                 $page = 'blog';
             } elseif (is_404()) {
                 $page = '404';
             } elseif (is_category()) {
                 $page = 'categories';
             } elseif (is_search()) {
                 $page = 'search';
             } elseif (is_archive()) {
                 $page = 'archives';
             } elseif (is_page()) {
                 $page = 'pages';
             }
         }
     } else {
         if (yit_get_option('enable-all-custom-sidebar') == 1) {
             $page = 'all-custom';
         } else {
             if (is_portfolio()) {
                 $page = 'portfolios';
             } elseif (is_gallery()) {
                 $page = 'galleries';
             } elseif (is_services()) {
                 $page = 'services';
             } elseif (is_testimonial()) {
                 $page = 'testimonial';
             }
         }
     }
     return $page;
 }
Esempio n. 3
0
 /**
  * Check if is portfolio, testimonial or gallery.
  * 
  * @return bool
  * @since 1.0.0
  */
 function is_internal()
 {
     global $post;
     if (!isset($post) || !is_object($post)) {
         return false;
     }
     return is_portfolio() || is_gallery() || is_testimonial() || is_services();
 }
Esempio n. 4
0
/**
 * The template for displaying the footer.
 *
 * @package WordPress
 * @subpackage Paradise
 */
get_sidebar('footer');
?>

<?php 
/* Always have wp_footer() just before the closing </body>
 * tag of your theme, or you will break many plugins, which
 * generally use this hook to reference JavaScript files.
 */
wp_footer();
if (is_portfolio() || is_tax('gallery')) {
    ?>

<!-- PrettyPhoto Lightbox Plugin Init -->
<script type="text/javascript">
function reloadPrettyPhoto() {
	jQuery(".pp_pic_holder").remove();
	jQuery(".pp_overlay").remove();
	jQuery(".ppt").remove();
	init_pretty();
}

function init_pretty(){
	jQuery('a[rel^="prettyPhoto"]').prettyPhoto({
		animationSpeed: 'normal',
		opacity: 0.70,
Esempio n. 5
0
$_theme_layout = $_theme_side_sidebar = $_theme_bottom_sidebar = '';
if (is_singular()) {
    $_theme_layout = get_post_meta(get_the_ID(), 'layout', true);
    $_theme_side_sidebar = get_post_meta(get_the_ID(), 'side_bar', true);
    $_theme_bottom_sidebar = get_post_meta(get_the_ID(), 'bottom_bar', true);
}
if (empty($_theme_layout)) {
    if (is_page()) {
        $_theme_layout = get_option('default_pages_layout', 3);
    } else {
        $_theme_layout = get_option('default_blog_layout', 1);
    }
}
if (empty($_theme_side_sidebar)) {
    if (is_category() || is_single() && is_post_type('post')) {
        $_theme_side_sidebar = get_option('blog_side_sidebar', 'disable');
    } else {
        $_theme_side_sidebar = get_option('default_side_sidebar', 'disable');
    }
}
if (empty($_theme_bottom_sidebar)) {
    if (is_portfolio()) {
        $_theme_bottom_sidebar = get_option('portfolio_bottom_sidebar', 'disable');
    } elseif (is_category()) {
        $_theme_bottom_sidebar = get_option('blog_bottom_sidebar', 'disable');
    } elseif (is_tax('gallery')) {
        $_theme_bottom_sidebar = get_option('gallery_bottom_sidebar', 'disable');
    } else {
        $_theme_bottom_sidebar = get_option('default_bottom_sidebar', 'disable');
    }
}