/**
  * Handles shortcode
  * @param $atts
  * @param null $content
  * @return string
  */
 public function handle($atts, $content = null)
 {
     extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
     $preLink = $link ? '<a href="' . $link . '">' : '';
     $postLink = $link ? '</a>' : '';
     $title = $title ? do_shortcode('[header level="4" style="' . $title_style . '"]' . $title . '[/header]') : '';
     $subtitle = $subtitle ? do_shortcode('[header level="5" style="' . $subtitle_style . '"]' . $subtitle . '[/header]') : '';
     $line = $title_line ? do_shortcode('[line style="none"]') : '';
     if (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '') {
         $priceHtml = '<span class="price"><em>' . $currency . '</em>' . $price . '<span>' . $subprice . '</span></span>';
     } else {
         $priceHtml = '<span class="price">' . $price . '<span>' . $subprice . '</span><em>' . $currency . '</em></span>';
     }
     if ($type == '2') {
         $imageShortcode = $imgsrc ? '<div class="frameImg type2">[rounded_img  size="260" src ="' . $imgsrc . '"][/rounded_img]</div>' : '';
     } else {
         $imageShortcode = $imgsrc ? '[rounded_img  size="320" src ="' . $imgsrc . '"][/rounded_img]' : '';
     }
     $content = '[paragraph]' . $content . '[/paragraph]';
     $mainContainerAtts = array('class' => array($class));
     $mainContainerAtts = array();
     $item = '
                 <li ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '>
                     ' . $preLink . '
                     <div class="descArea">
                        ' . $title . $line . $subtitle . $content . $priceHtml . '
                     </div>
                     ' . $imageShortcode . $postLink . '
                 </li>
             ';
     return do_shortcode($item);
 }
 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $class = isset($this->field['class']) ? $this->field['class'] : 'regular-text';
     echo '<input type="hidden" id="' . $this->field['id'] . '" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . ']" value="' . $this->value . '" class="' . $class . '" />';
     //add dimensions - either with style or hidden
     //if($this->value != ''){
     echo '<img class="nhp-opts-screenshot" id="nhp-to-upload nhp-opts-screenshot-' . $this->field['id'] . '" src="' . $this->value . '" />';
     //}
     if ($this->value == '') {
         $remove = ' style="display:none;"';
         $upload = '';
     } else {
         $remove = '';
         $upload = ' style="display:none;"';
     }
     echo ' <a href="javascript:void(0);" class="nhp-to-upload nhp-opts-upload button-secondary"' . $upload . ' rel-id="' . $this->field['id'] . '">' . __('Browse', 'nhp-opts') . '</a>';
     if (isset($this->field['show_dimensions']) && $this->field['show_dimensions']) {
         $style = $this->value != '' ? '' : ' style="display:none"';
         echo '<br/><label' . $style . ' class="dimensions nhp-uploaded">' . __("Width:", 'ct_theme') . ' <input type="text" id="' . $this->field['id'] . '_width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_width]" value="' . ct_get_option($this->field['id'] . '_width') . '" class="short ' . $class . '" /></label>';
         echo ' <label' . $style . ' class="dimensions nhp-uploaded">' . __("Height:", 'ct_theme') . ' <input type="text" id="' . $this->field['id'] . '_height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_height]" value="' . ct_get_option($this->field['id'] . '_height') . '" class="short ' . $class . '" /></label>';
     } else {
         echo '<input type="hidden" id="' . $this->field['id'] . '_width" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_width]" value="' . ct_get_option($this->field['id'] . '_width') . '" class="' . $class . '" />';
         echo '<input type="hidden" id="' . $this->field['id'] . '_height" name="' . $this->args['opt_name'] . '[' . $this->field['id'] . '_height]" value="' . ct_get_option($this->field['id'] . '_height') . '" class="' . $class . '" />';
     }
     echo ' <a href="javascript:void(0);" class="nhp-opts-upload-remove nhp-uploaded"' . $remove . ' rel-id="' . $this->field['id'] . '">' . __('Remove Upload', 'nhp-opts') . '</a>';
     echo isset($this->field['desc']) && !empty($this->field['desc']) ? '<br/><br/><span class="description">' . $this->field['desc'] . '</span>' : '';
 }
function ct_use_blog_post_sidebar()
{
    if (ct_get_option('posts_single_sidebar', 1) == 0) {
        return false;
    }
    return true;
}
 /**
  * Creates object
  * @param string $theme
  * @param string $metadataUrl
  * @param bool $enableAutomaticChecking
  */
 public function __construct($theme, $metadataUrl = null, $enableAutomaticChecking = true)
 {
     $metadataUrl = $metadataUrl ? $metadataUrl : 'http://update.themeforest.createit.pl';
     parent::__construct($theme, $metadataUrl, $enableAutomaticChecking);
     $this->addQueryArgFilter(array($this, 'filterQuery'));
     $this->license = ct_get_option(self::LICENSE_KEY);
     add_filter('update_theme_complete_actions', array($this, 'themeUpdate'));
 }
 /**
  * Returns permalink slug
  * @return string
  */
 protected function getPermalinkSlug()
 {
     // Rewriting Permalink Slug
     $permalink_slug = ct_get_option('event', 'event');
     if (empty($permalink_slug)) {
         $permalink_slug = 'event';
     }
     return $permalink_slug;
 }
 /**
  * Returns permalink slug
  * @return string
  */
 protected function getPermalinkSlug()
 {
     // Rewriting Permalink Slug
     $permalink_slug = ct_get_option('product_index_slug', 'product');
     if (empty($permalink_slug)) {
         $permalink_slug = 'product';
     }
     return $permalink_slug;
 }
 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $size = isset($this->field['size']) ? $this->field['size'] : 120;
     $align = isset($this->field['align']) ? $this->field['align'] : 'center';
     $class = isset($this->field['class']) ? ' ' . $this->field['class'] : '';
     $content = isset($this->field['option']) ? ct_get_option($this->field['option']) : '';
     $content = strtr(isset($this->field['option_template']) ? $this->field['option_template'] : '%option%', array('%option%' => $content));
     if ($content == '' && isset($this->field['desc'])) {
         $content = $this->field['desc'];
     }
     $imgUrl = 'https://chart.googleapis.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chld=H|1&chl=' . urlencode($content);
     echo '</td></tr></table><div class="nhp-opts-info-field' . $class . '"' . ($align ? 'style="text-align:' . $align . '"' : '') . '>' . '<img src="' . $imgUrl . '" alt="qrcode">' . '</div><table class="form-table no-border"><tbody><tr><th></th><td>';
 }
function theme_comments($comment, $args, $depth)
{
    $GLOBALS['comment'] = $comment;
    ?>

<li>
	<div class="oneComment" id="comment-<?php 
    comment_ID();
    ?>
">
		<div class="media">
                <span class="pull-left roundedImg">
	                <?php 
    echo get_avatar($comment, $size = '55', $default = 'mystery');
    ?>
                </span>

			<div class="media-body">
				<?php 
    echo get_comment_author_link();
    ?>
<br>
				<?php 
    echo get_comment_date();
    if (get_comment_time()) {
        ?>
 <?php 
        _e('at', 'ct_theme');
        ?>
 <?php 
        echo get_comment_time();
    }
    ?>
				<?php 
    if (ct_get_option("posts_single_show_comment_form", 1)) {
        ?>
					<div class="pull-right"><?php 
        comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth'])));
        ?>
</div><?php 
    }
    ?>
			</div>
			<?php 
    comment_text();
    ?>
		</div>

	</div>
	<?php 
}
    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $mainContainerAtts = array('class' => array('priceHeader', $class));
        $html = '
		<div ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '">
                    <span class="lft">' . $left_header . '</span>
                    <span class="price">
                      <span class="el_1">' . $above_price_text . '</span>
                      ' . (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '' ? '<span class="el_2">' . $currency . '</span>' : '<span class="el_3">' . $price . '</span> <span class="el_4">' . $sub_price . '</span>') . '
                      ' . (ct_get_option('products_currency_position', 'before_price') == 'before_price' || ct_get_option('products_currency_position', 'before_price') == '' ? '<span class="el_3">' . $price . '</span> <span class="el_4">' . $sub_price . '</span>' : '<span class="el_2">' . $currency . '</span>') . '

                    </span>
                    <span class="rt">' . $right_header . '</span>
        </div>';
        return do_shortcode($html);
    }
    /**
     * Adds Google Analytics
     */
    function handleGoogleAnalytics()
    {
        if ($num = ct_get_option('code_google_analytics_account')) {
            echo '<script type="text/javascript">';
            echo <<<EOF
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '{$num}']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
EOF;
            echo '</script>';
        }
    }
<?php

get_template_part('templates/header');
$faqData = get_post() && ct_get_option('faq_index_page') == get_the_ID() ? 'data-spy="scroll" data-target="#faq1" data-offset="5"' : '';
?>
<body <?php 
body_class((ct_get_option('general_show_preloader', 0) ? 'preloader ' : '') . (function_exists('icl_object_id') ? ICL_LANGUAGE_CODE . ' ' : '') . (ct_add_menu_shadow() ? 'menuShadow ' : ''));
?>
 <?php 
echo $faqData;
?>
>
<div id="ct_preloader"></div>
<?php 
get_template_part('templates/head-top-navbar');
?>

<div class="container">
	<?php 
include roots_template_path();
?>
</div>

<?php 
get_template_part('templates/footer');
?>

<!--footer-->
<?php 
wp_footer();
?>
<!--container!--></div>
<div class="bg-2 section" id="blogBgImage">
    <div class="inner"
         data-scroll="scroll"
         data-topspace="75">
        <div class="container">
            <?php 
if (ct_get_option("posts_index_show_p_title", 1)) {
    ?>
                <h3 class="hdr1"><?php 
    echo __('Posts in', 'ct_theme') . ' ' . single_cat_title('', false);
    ?>
</h3>
            <?php 
}
?>
            <div class="divider-triangle"></div>
            <div id="pageWithSidebar" class="">

                <div class="blog-list">
                    <div class="row">
                        <div class="col-md-8 blog-main">
                            <?php 
get_template_part('templates/content');
?>
                        </div>


                        <?php 
if (ct_use_blog_index_sidebar()) {
    ?>
    /**
     * Handles shortcode
     * @param $atts
     * @param null $content
     * @return string
     */
    public function handle($atts, $content = null)
    {
        $image = '';
        extract(shortcode_atts($this->extractShortcodeAttributes($atts), $atts));
        $args = array('name' => $slug, 'post_type' => 'event', 'post_status' => 'publish', 'numberposts' => 1);
        $my_posts = get_posts($args);
        if ($my_posts) {
            $id = $my_posts[0]->ID;
            $title = $my_posts[0]->post_title;
            $content = get_post_field('post_content', $id);
            if ($id) {
                $custom = get_post_custom($id);
                $permalink = get_permalink($id);
                $date = $custom['date'][0];
                $subtitle = $custom['subtitle'][0];
                $amap = $custom['amap'][0];
                $date = $date ? strtotime($date) : '';
                if ($date != '') {
                    $timestamp = mktime(0, 0, 0, date('m', $date), 1);
                    $month = __(strtoupper(strftime('%b', $timestamp)), 'ct_theme');
                    $day = date('d', $date);
                } else {
                    $month = '';
                    $day = '';
                }
            }
            wp_reset_postdata();
            /*is amap iframe?*/
            preg_match('/src="([^"]+)"/', $amap, $match);
            if ($match == null) {
                $amap .= '&output=embed?iframe=true&width=640&height=480';
            } else {
                $amap = $match[1] . '?iframe=true&width=640&height=480';
            }
            $image = ct_get_option('event_show_featured_image', 0) && ct_get_feature_image_src($id, 'large') ? '<span class="date featureImg"><a target="_blank" data-rel="prettyPhoto" href="' . ct_get_feature_image_src($id, 'large') . '" ><img src="' . ct_get_feature_image_src($id, 'thumb_square') . '" alt=""></a></span>' : '';
            $type2 = $style == '2' ? 'type2' : '';
            $mainContainerAtts = array('class' => array('eventBox', $type2, $class));
            $html = '

        <div ' . $this->buildContainerAttributes($mainContainerAtts, $atts) . '>
        <span class="date">' . $month . '<span>' . $day . '</span></span>

        <h4 class="hdr2">' . $title . '

          <span class="place">' . $content . '</span>
          <span class="time">' . $subtitle . '</span>
        </h4>
        <hr>



        <div class="clearfix"></div>
        <!-- go to http://amap.to/ and create your own map -->
        ' . $image . '<a href="' . htmlentities($amap) . '" data-rel="prettyPhoto" class="mapit"><i></i>' . __('Map it', 'ct_theme') . '</a>
        <a target="_blank" href="http://www.facebook.com/sharer/sharer.php?u=' . $permalink . '" class="shareit"><i></i>' . __('Share it', 'ct_theme') . '</a>

      </div>
		';
            return do_shortcode($html);
        } else {
            return '';
        }
    }
 function ct_get_blog_item_title()
 {
     $postTitle = get_the_title();
     $custom = get_post_custom(get_the_ID());
     if (!isset($custom['show_title']) || $custom['show_title'][0] == 'global') {
         if (ct_get_option("posts_single_show_title", 1)) {
             return $postTitle;
         } else {
             return '';
         }
     }
     if ($custom['show_title'][0] == 'yes') {
         return $postTitle;
     } else {
         if ($custom['show_title'][0] == 'no') {
             return '';
         }
     }
     return '';
 }
?>


			</div>

			<!-- Collect the nav links, forms, and other content for toggling -->
			<div class="collapse navbar-collapse navbar-ex1-collapse">
				<?php 
if (ct_get_option('navbar_type') == 'standard') {
    if (ct_is_location_contains_menu('nav_standard')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 135) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_standard', 'menu_class' => 'nav navbar-nav text-center', 'menu_id' => 'menu_' . ct_get_option('navbar_standard_menu')));
    }
}
if (ct_get_option('navbar_type') == 'sticky') {
    if (ct_is_location_contains_menu('nav_sticky_left')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 145) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_sticky_left', 'menu_class' => 'nav navbar-nav pull-left', 'menu_id' => 'menu_2'));
    }
    if (ct_is_location_contains_menu('nav_sticky_right')) {
        wp_nav_menu(array('items_wrap' => '<ul data-type="margin-top" data-pos="' . ct_get_option('navbar_margin_top', 145) . '" id="%1$s" class="%2$s">%3$s</ul>', 'theme_location' => 'nav_sticky_right', 'menu_class' => 'nav navbar-nav pull-right', 'menu_id' => 'menu_3'));
    }
}
?>
			</div>
			<!-- /.navbar-collapse -->
		</div>
		<!-- / container -->

		<div class="btm"></div>
	</div>

</nav>
    /**
     * Draw s product meta
     */
    public function productMeta()
    {
        global $post;
        $custom = get_post_custom($post->ID);
        $price = isset($custom["price"][0]) ? $custom["price"][0] : "";
        $currency = isset($custom["currency"][0]) ? $custom["currency"][0] : ct_get_option('products_index_currency', '$');
        $postscript = isset($custom["postscript"][0]) ? $custom["postscript"][0] : "";
        ?>
        <p>
            <label for="price"><?php 
        _e('Price', 'ct_theme');
        ?>
: </label>
            <input id="price" class="regular-text" name="price" value="<?php 
        echo $price;
        ?>
"/>
        <p class="howto"><?php 
        _e("Product price", 'ct_theme');
        ?>
</p>

        <p>
            <label for="currency"><?php 
        _e('Currency', 'ct_theme');
        ?>
: </label>
            <input id="currency" class="regular-text" name="currency" value="<?php 
        echo $currency;
        ?>
"/>
        <p class="howto"><?php 
        _e("Product currency. Default value can be changed in Appearance - Theme Options - Products tab", 'ct_theme');
        ?>
</p>

        <p>
            <label for="postscript"><?php 
        _e('Postscript', 'ct_theme');
        ?>
: </label>
            <input id="postscript" class="regular-text" name="postscript" value="<?php 
        echo $postscript;
        ?>
"/>
        <p class="howto"><?php 
        _e("Smaller text below product description", 'ct_theme');
        ?>
</p>


    <?php 
    }
 /**
  * @param $v
  * @return int
  */
 public static function handlePreOptionPostsPerPage($v)
 {
     if (ct_has_option('posts_index_per_page')) {
         $pp = absint(ct_get_option('posts_index_per_page'));
     } else {
         return $v;
     }
     if (-1 === $pp || $pp > 0) {
         return $pp;
     } else {
         return $v;
     }
 }

        <?php 
if (ct_get_option("posts_single_show_content", 1)) {
    ?>
		        <!-- blogItem -->

						<div class="blogItem format-aside">
					        <?php 
    the_content();
    ?>
					</div>

					<!-- / blogItem -->
        <?php 
}
?>








}
?>

	<?php 
$cats = get_the_terms(get_the_ID(), 'category');
?>
	<?php 
if (ct_get_option("posts_index_show_categories", 1) && $cats) {
    ?>
		<span class="meta_categories"><i class="fa fa-tags"></i> <a href="<?php 
    the_permalink();
    ?>
%category"><?php 
    the_category(', ', '', get_the_ID());
    ?>
 </a></span>
	<?php 
}
?>

	<?php 
if (ct_get_option("posts_index_show_tags", 0)) {
    ?>
		<?php 
    the_tags('<span class="meta_tags"><i class="fa fa-folder-open-o"></i> ', ', ', '</span>');
    ?>
	<?php 
}
?>
</div>
<?php

$limit = ct_get_option("portfolio_index_max_items", 100);
$filters = ct_get_option("portfolio_index_show_filters", 1) ? ' filters="true"' : '';
$title = ct_get_option("portfolio_index_show_title", 1) ? ' titles="yes"' : ' titles="no"';
$summary = ct_get_option("portfolio_index_show_summary", 1) ? ' summaries="yes"' : ' summaries="no"';
$columns = ct_get_option('portfolio_index_items_cols', 4);
//$order = ct_get_option("portfolio_index_order", 0) ? ' orderby="menu_order" order="asc"' : '';
?>

<?php 
while (have_posts()) {
    the_post();
    ?>
		<section class="container">
<?php 
    the_content();
    wp_link_pages(array('before' => '<nav class="pager">', 'after' => '</nav>'));
    ?>
</section>

<?php 
}
?>



<?php 
//echo do_shortcode('[works ' . $filters . ' limit="' . $limit . '" columns="' . $columns . '" ' . $title . $summary . $order . ']')
?>
    <span class="meta_date"><?php 
    echo get_the_date();
    ?>
</span>
<?php 
}
if (ct_get_option("posts_single_show_comments_link", 1)) {
    ?>
    <span class="meta_comments"><a href="<?php 
    echo get_permalink(get_the_ID());
    ?>
#comments"><em><?php 
    echo wp_count_comments(get_the_ID())->approved;
    ?>
</em><span><?php 
    echo __('Comments', 'ct_theme');
    ?>
</span></a></span>
<?php 
}
if (ct_get_option("posts_single_show_author", 1)) {
    ?>
    <span class="meta_author">by <?php 
    the_author_posts_link();
    ?>
</span>
<?php 
}
?>
</div>
    if (ct_get_option('style_color_basic_background') && !ct_get_option('style_color_basic_background_image')) {
        ?>
 background-image: none;
		<?php 
    }
    ?>
    }
    <?php 
}
?>

	<?php 
$sizes = array('1' => 45, '2' => 40, '3' => 35, '4' => 25, '5' => 25, '6' => 20);
?>
	<?php 
foreach ($sizes as $tag => $size) {
    ?>
			<?php 
    echo ct_get_option_pattern('style_font_size_h' . $tag, 'h' . $tag . '{font-size: %dpx;}', $size);
    ?>
	<?php 
}
?>

	<?php 
/*custom style - code tab*/
?>
	<?php 
echo ct_get_option('code_custom_styles_css');
?>
</style>
<h3 class="blog_title"><a href="<?php 
echo get_permalink(get_the_ID());
?>
"><?php 
echo ct_get_blog_item_title();
?>
</a>
</h3>
<?php 
if (ct_get_option("posts_index_show_image", 1)) {
    ?>
    <div class="blog_thumbnail">
        <div class="videoFrameContainer">
            <?php 
    $embed = get_post_meta($post->ID, 'videoCode', true);
    if (!empty($embed)) {
        echo stripslashes(htmlspecialchars_decode($embed));
    } else {
        ct_post_video($post->ID, 541, 256);
    }
    ?>
        </div>
    </div>
<?php 
}
get_template_part('templates/post/content-meta');
the_content();
?>


 /**
  * Returns config
  * @return null
  */
 public function getAttributes()
 {
     return array('user' => array('label' => __('username', 'ct_theme'), 'default' => '', 'type' => 'input', 'help' => __("Twitter username", 'ct_theme')), 'key' => array('label' => __('customer key', 'ct_theme'), 'default' => ct_get_option('general_twit_customer_key', ''), 'type' => 'input', 'help' => __("Customer key", 'ct_theme')), 'secret' => array('label' => __('customer secret', 'ct_theme'), 'default' => ct_get_option('general_twit_customer_secret', ''), 'type' => 'input', 'help' => __("Customer secret", 'ct_theme')), 'token' => array('label' => __('token', 'ct_theme'), 'default' => ct_get_option('general_twit_token', ''), 'type' => 'input', 'help' => __("Access token", 'ct_theme')), 'token_secret' => array('label' => __('token secret', 'ct_theme'), 'default' => ct_get_option('general_twit_token_secret', ''), 'type' => 'input', 'help' => __("Access token secret", 'ct_theme')), 'limit' => array('label' => __('limit', 'ct_theme'), 'default' => '2', 'type' => 'input', 'help' => __("Limit news", 'ct_theme')), 'button' => array('label' => __("follow us button", 'ct_theme'), 'default' => __('Follow us', 'ct_theme'), 'type' => 'input', 'help' => "Follow us button label. Leave blank to hide it", 'ct_theme'), 'newwindow' => array('label' => __("new window?", 'ct_theme'), 'default' => 'false', 'type' => 'checkbox', 'help' => "Open in new window follow us button?", 'ct_theme'), 'parseurl' => array('label' => __('parse url', 'ct_theme'), 'default' => 'short', 'type' => 'select', 'choices' => array('plain' => __('plain text', 'ct_theme'), 'short' => __('short link', 'ct_theme'), 'display' => __('display link', 'ct_theme')), 'help' => __("You can display links from the content as plain text, short html links or full html links", 'ct_theme')), 'parsemedia' => array('label' => __('parse media', 'ct_theme'), 'default' => 'short', 'type' => 'select', 'choices' => array('plain' => __('plain text', 'ct_theme'), 'short' => __('short link', 'ct_theme'), 'display' => __('display link', 'ct_theme'), 'expanded' => __('expanded link', 'ct_theme')), 'help' => __("You can display media links from the content as plain text or 3 types of html links", 'ct_theme')), 'parseid' => array('label' => __('parse user id?', 'ct_theme'), 'default' => 'yes', 'type' => 'select', 'choices' => array('yes' => __('yes', 'ct_theme'), 'no' => __('no', 'ct_theme')), 'help' => __("Display user @ids as plain text or links", 'ct_theme')), 'parsehashtag' => array('label' => __('parse hashtag?', 'ct_theme'), 'default' => 'yes', 'type' => 'select', 'choices' => array('yes' => __('yes', 'ct_theme'), 'no' => __('no', 'ct_theme')), 'help' => __("Display #hashtags as plain text or links", 'ct_theme')), 'img' => array('label' => __('embed images?', 'ct_theme'), 'default' => 'no', 'type' => 'select', 'choices' => array('yes' => __('yes', 'ct_theme'), 'no' => __('no', 'ct_theme')), 'help' => __("Embed images into posts content?", 'ct_theme')), 'imgsize' => array('label' => __('size of embeded images?', 'ct_theme'), 'default' => 'thumb', 'type' => 'select', 'choices' => array('thumb' => __('thumb', 'ct_theme'), 'small' => __('small', 'ct_theme'), 'medium' => __('medium', 'ct_theme'), 'large' => __('large', 'ct_theme')), 'help' => __("Embedded image size", 'ct_theme')), 'maxlength' => array('label' => __('tweet length limit', 'ct_theme'), 'default' => '', 'type' => 'input', 'help' => __("Max length of the tweet", 'ct_theme')));
 }
}
?>
    <?php 
get_template_part('templates/post/content-meta');
?>
    <?php 
if (ct_get_option("posts_index_show_excerpt", 1) && get_the_content()) {
    ?>
        <p><?php 
    echo strip_tags(get_the_excerpt());
    ?>
</p>
    <?php 
}
?>
    <?php 
if (ct_get_option("posts_index_show_excerpt", 1)) {
    ?>
        <a class="btn btn-primary btn-sm btn-blog" href="<?php 
    echo get_permalink(get_the_ID());
    ?>
"><?php 
    echo __('read more', 'ct_theme');
    ?>
</a>
    <?php 
}
?>
    <hr class="dashed-separator">
</div>
 /**
  * Field Render Function.
  *
  * Takes the vars and outputs the HTML for the field in the settings
  *
  * @since NHP_Options 1.0
  */
 function render()
 {
     $class = isset($this->field['class']) ? ' ' . $this->field['class'] : '';
     $value = isset($this->field['option']) ? ct_get_option($this->field['option']) : $this->value;
     echo '</td></tr></table><div class="nhp-opts-info-field' . $class . '">' . strtr($this->field['desc'], array('%value%' => $value)) . '</div><table class="form-table no-border"><tbody><tr><th></th><td>';
 }
 /**
  * Is it active?
  * @return bool
  */
 public function isEnabled()
 {
     $val = ct_get_option('general_show_css_animate');
     return $val === '' || $val;
 }
<?php

//The Query
global $wp_query;
$arrgs = $wp_query->query_vars;
$arrgs['posts_per_page'] = ct_get_option("posts_index_per_page", 3);
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$arrgs['paged'] = $paged;
$wp_query->query($arrgs);
?>


<div class="inner">


	<?php 
if (have_posts()) {
    ?>
		<?php 
    while (have_posts()) {
        the_post();
        ?>
			<?php 
        $format = get_post_format();
        $format = $format ? $format : 'standard';
        $class = $format == 'standard' ? 'format-type-image' : 'format-type-' . $format;
        ?>
			<article id="post-<?php 
        the_ID();
        ?>
" <?php 
</p>
    <?php 
}
?>
    <?php 
if (ct_get_option("posts_index_show_excerpt", 1)) {
    ?>
        <a class="btn btn-primary btn-sm btn-blog" href="<?php 
    echo get_permalink(get_the_ID());
    ?>
"><?php 
    echo __('read more', 'ct_theme');
    ?>
</a>
    <?php 
} elseif (ct_get_option("posts_index_show_fulltext", 0)) {
    ?>
        <?php 
    the_content();
    ?>
    <?php 
}
?>
    <hr class="dashed-separator">
</div>





<footer>
		<div class="container">
			<div class="row">
				<div class="col-md-3">
					<?php 
dynamic_sidebar('sidebar-footer1');
?>
				</div>

				<div class="col-md-6">
					<?php 
dynamic_sidebar('sidebar-footer2');
?>
				</div>

				<div class="col-md-3">
					<?php 
dynamic_sidebar('sidebar-footer3');
?>
				</div>
			</div>

		</div>
	<p class="copyright"> <?php 
echo strtr(ct_get_option('general_footer_text', ''), array('%year%' => date('Y'), '%name%' => get_bloginfo('name', 'display')));
?>
</p>
	<a href="#" id="toTop"></a>
</footer>