Example #1
0
/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <*****@*****.**>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
global $wp_query, $post, $more;
$blog_type = 'big';
if (is_testimonial()) {
    echo do_shortcode('[testimonials]');
    return;
}
if (is_single()) {
    $blog_type = 'big';
}
if (is_category() || is_tag()) {
    if (is_category()) {
        echo do_shortcode(category_description());
    } elseif (is_tag()) {
        echo do_shortcode(tag_description());
    }
    echo '<div class="clear"></div>';
}
if (is_category() || is_archive() || is_search()) {
 /**
  * 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;
 }
Example #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();
 }