Sari la conținut
Forum Roportal
Panait.nicu88

Inserare linie fara continut in codul generat de catre WordPress

Evaluează acest topic

Postări Recomandate

Salut!

In browser se generaza un spatiu liber la inceputul fiecarei pagini trimise in browser
1.
2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3. <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ro">
4. ....

Tin sa precizez ca am dezactivat toate modulele si am verificat cu alta tema si este ok, acesta eroare pare fi cauzata din tema dar nu stiu unde este problema.

Codurile din tema sunt urmatoarele:

index.php

<?php get_header(); ?> 
<div class="hgroup"><hgroup>
<h1 class="site-title"><a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</hgroup></div>

<?php get_template_part( 'featured', get_post_format() );?>

<?php if ( get_option_mmtheme('ad_2_on_off') == 'true' ) { ;?> 
<div class="ad-2">
<?php echo stripslashes( get_option_mmtheme('ad_2') ) ?> 
</div>
<?php } ?> 

<!-- Featured Area Starts-->
<?php if ( get_option_mmtheme('featured_area_on_off') == 'true' ) { ;?> 

<?php $featured_area_1 = get_option('featured_area_1'); ?> 
<?php /* Category credentials */
$category_id = $featured_area_1;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="block posts">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?> 

<div class="post">
<h2><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2>
<figure class="image">
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail( 'featuredbig' ); ?></a>

<div class="title">
<?php _e("by", "mm"); ?> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s'), get_the_author() ); ?>"><?php the_author(); ?> </a> - <?php the_time('j F Y') ?>
</div>
</figure>
<?php the_content_limit('305'); ?>
</div>
<?php endwhile; else: ?>
<?php endif; ?>
<?php wp_reset_query(); ?> 

<ul class="list-posts">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?> 
<li>
<figure class="image">
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_post_thumbnail( 'featuredsmall' ); ?></a>
<div class="title">
<?php _e("by", "mm"); ?> <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s'), get_the_author() ); ?>"><?php the_author(); ?> </a> - <?php the_time('j F Y') ?>
</div>
</figure>
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php endwhile; else: ?>
<?php endif; ?>
<?php wp_reset_query(); ?>	
</ul>
</div>

<!-- Featured Area Ends-->
<?php } ?> 
</div>


<?php if ( get_option_mmtheme('ad_3_on_off') == 'true' ) { ;?> 
<div class="ad-3">
<?php echo stripslashes( get_option_mmtheme('ad_3') ) ?> 
</div>
<?php } ?> 



<!-- Block 1 Starts-->	
<?php if ( get_option_mmtheme('b1_on_off') == 'true' ) { ;?>
<?php
$b1_cat = get_option('b1_cat');
?> 
<?php /* Category credentials */
$category_id = $b1_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block1">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles"> 
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 1 Ends-->



<!-- Block 2 Starts-->	
<?php if ( get_option_mmtheme('b2_on_off') == 'true' ) { ;?>
<?php
$b2_cat = get_option('b2_cat');
?> 
<?php /* Category credentials */
$category_id = $b2_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block2">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 2 Ends-->


<!-- Block 3 Starts-->	
<?php if ( get_option_mmtheme('b3_on_off') == 'true' ) { ;?>
<?php
$b3_cat = get_option('b3_cat');
?> 
<?php /* Category credentials */
$category_id = $b3_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block3">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 3 Ends-->


<!-- Block 4 Starts-->	
<?php if ( get_option_mmtheme('b4_on_off') == 'true' ) { ;?>
<?php
$b4_cat = get_option('b4_cat');
?> 
<?php /* Category credentials */
$category_id = $b4_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block4">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 4 Ends-->



<!-- Block 5 Starts-->	
<?php if ( get_option_mmtheme('b5_on_off') == 'true' ) { ;?>
<?php
$b5_cat = get_option('b5_cat');
?> 
<?php /* Category credentials */
$category_id = $b5_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block5">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 5 Ends-->



<!-- Block 6 Starts-->	
<?php if ( get_option_mmtheme('b6_on_off') == 'true' ) { ;?>
<?php
$b6_cat = get_option('b6_cat');
?> 
<?php /* Category credentials */
$category_id = $b6_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block6">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 6 Ends-->



<!-- Block 7 Starts-->	
<?php if ( get_option_mmtheme('b7_on_off') == 'true' ) { ;?>
<?php
$b7_cat = get_option('b7_cat');
?> 
<?php /* Category credentials */
$category_id = $b7_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block7">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 7 Ends-->



<!-- Block 8 Starts-->	
<?php if ( get_option_mmtheme('b8_on_off') == 'true' ) { ;?>
<?php
$b8_cat = get_option('b8_cat');
?> 
<?php /* Category credentials */
$category_id = $b8_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block8">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 8 Ends-->



<!-- Block 9 Starts-->	
<?php if ( get_option_mmtheme('b9_on_off') == 'true' ) { ;?>
<?php
$b9_cat = get_option('b9_cat');
?> 
<?php /* Category credentials */
$category_id = $b9_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block9">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 9 Ends-->



<!-- Block 10 Starts-->	
<?php if ( get_option_mmtheme('b10_on_off') == 'true' ) { ;?>
<?php
$b10_cat = get_option('b10_cat');
?> 
<?php /* Category credentials */
$category_id = $b10_cat;
$category_link = get_category_link( $category_id );
$category_name = get_cat_name($category_id);
?>
<div class="box block10">
<div class="political-info">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=0&posts_per_page=1&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>

<h2> <a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php echo ($category_name); ?></a></h2>
<div class="block">
<div class="info">
<article class="article">
<h3><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></h3>
<?php if( has_post_thumbnail() ) { ?> 
<div class="holder">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blockbig' ); ?></a>	
<?php the_content_limit(' 398'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } else { ?> 
<div class="holder no-thumb-big">	
<?php the_content_limit(' 598'); ?>
<div class="more">
<a href="<?php the_permalink(); ?>"><?php _e("read more", "mm"); ?></a>
</div>
</div>
<?php } ?>
</article>
<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
<ul class="list-articles">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=1&posts_per_page=2&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if( has_post_thumbnail() ) { ?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'blocksmall' ); ?></a>	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>
<?php } else { ?> 
<li class="no-thumb">	
<a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a>
</li>

<?php } ?>

<?php endwhile; else: ?><?php endif; ?><?php wp_reset_query(); ?>
</ul>
</div>
<aside class="more-political">
<h3><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></h3>
<ul class="headlines-list">
<?php $query = new WP_Query();
$query->query('ignore_sticky_posts=1&offset=3&posts_per_page=5&cat=' . $category_id);
if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?> </a></li>
<?php endwhile; else: ?><?php endif; ?>	
</ul>
</aside>
</div>
<div class="more-news">
<a href="<?php echo ($category_link); ?>" title="<?php echo ($category_name); ?>"><?php _e("More", "mm"); ?> <?php echo ($category_name); ?> <?php _e("news", "mm"); ?></a>	
</div>
<?php wp_reset_query(); ?>
</div>
</div>
<?php } ?>
<!-- Block 10 Ends-->



<?php get_footer(); ?>
header.php

<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />

<?php if ( get_option_mmtheme('seo_on_off') == 'true' ) { ; ?>

<title><?php m3_titles(); ?></title>
<?php if (is_single() || is_page() ) : if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<meta name="description" content="<?php the_excerpt_rss(); ?>" />
<meta name="keywords" content="<?php echo get_option_mmtheme( 'homepage-seo-keyword' ) ?>" />
<?php endwhile; endif; elseif(is_home()) : ?>
<meta name="description" content="<?php echo get_option('blogdescription'); ?>" />
<meta name="keywords" content="<?php echo get_option_mmtheme( 'homepage-seo-keyword' ) ?>" /> <?php endif; ?>
<?php if ( get_option_mmtheme('canonical_on_off') == 'true' ) { ;?> 
<?php #homepage urls
if (is_home() )echo '<link rel="canonical" href="'.get_bloginfo('url').'" />';
#single page urls
global $wp_query; 
$postid = $wp_query->post->ID; 
if (is_single() || is_page()) echo '<link rel="canonical" href="'.get_permalink().'" />';	
#index page urls
if (is_archive() || is_category() || is_search()) echo '<link rel="canonical" href="'.get_permalink().'" />';	
?> <?php } ?> 
<?php rel_next_prev(); ?> 
<?php m3_indexing(); ?>

<?php } elseif ( ( get_option_mmtheme('seo_on_off') == 'false' ) ) { ?>	
<title>
<?php wp_title(' '); ?>
<?php if(wp_title(' ', false)) { echo '|'; } ?> 
<?php bloginfo('name'); ?>
</title>
<?php } ?>

<meta name="generator" content="" />
<link rel="profile" href="http://gmpg.org/xfn/11" /> 
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<link href='http://fonts.googleapis.com/css?family=Cabin:700,400' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic,700,700italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Droid+Serif:400,400italic,700' rel='stylesheet' type='text/css'> 
<link href='http://fonts.googleapis.com/css?family=Lora:400,400italic,700,700italic' rel='stylesheet' type='text/css'>



<!--[if lt IE 9]>
<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script>


<![endif]-->
<!-- OpenGraph Facebook Start --> 
<?php if (is_single()) { ?>
<meta property="og:title" content="<?php single_post_title(''); ?>" />
<?php function og_meta_desc() {
global $post;
$meta = strip_tags($post->post_content);
$meta = strip_shortcodes($meta);
$meta = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), ' ', $meta);
$meta = substr($meta, 0, 200);
if ( $meta != '' ) {
echo "<meta property=\"og:description\" content=\"$meta...\" />";
} else {
echo "<meta property=\"og:description\" content=\"Here is some cool new content. Check it out.\" />";
}
} og_meta_desc(); ?>
<meta property="og:image" content="<?php echo wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ) ) ?>" /> <?php } else { } ?>
<!-- OpenGraph Facebook Ends -->

<?php mmtheme_get_google_font( get_option_mmtheme( 'body_postpage_font' ) ) ?> 
<?php mmtheme_get_google_font( get_option_mmtheme( 'slider_cats_area' ) ) ?>
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h1_font' ) ) ?>
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h2_font' ) ) ?>
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h3_font' ) ) ?>
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h4_font' ) ) ?>
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h5_font' ) ) ?> 
<?php mmtheme_get_google_font( get_option_mmtheme( 'body_h6_font' ) ) ?> 


<style>
.single-wrapper .entry-content p, .single-wrapper .entry-content {font-size: <?php get_option_mmtheme( 'postcontent_font_size' , true) ?>px !important; }
.entry-content h1 {font-family: <?php get_option_mmtheme( 'body_h1_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h1_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h1_font_color' , true) ?> ;}
.entry-content h2 {font-family: <?php get_option_mmtheme( 'body_h2_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h2_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h2_font_color' , true) ?> ;}
.entry-content h3 {font-family: <?php get_option_mmtheme( 'body_h3_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h3_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h3_font_color' , true) ?> ;}
.entry-content h4 {font-family: <?php get_option_mmtheme( 'body_h4_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h4_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h4_font_color' , true) ?> ;}
.entry-content h5 {font-family: <?php get_option_mmtheme( 'body_h5_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h5_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h5_font_color' , true) ?> ;}
.entry-content h6 {font-family: <?php get_option_mmtheme( 'body_h6_font' , true) ?> ;font-size: <?php get_option_mmtheme( 'body_h6_font_size' , true) ?>px !important; color: <?php get_option_mmtheme( 'body_h6_font_color' , true) ?> ;}

.entry-content a {
color: <?php get_option_mmtheme( 'body_link_color' , true) ?> !important;
text-decoration : none;
}
.entry-content a:hover	{
color:<?php get_option_mmtheme( 'body_link_hover_color' , true) ?> !important;
text-decoration : none;}

/* Block color style*/
.block1 .political-info{border-color:<?php get_option_mmtheme( 'b1_color' , true) ?>;}
.block1 .political-info h2 a{color: <?php get_option_mmtheme( 'b1_color' , true) ?>;}
.block1 .more-political h3 {background: <?php get_option_mmtheme( 'b1_color' , true) ?>;}

.block2 .political-info{border-color:<?php get_option_mmtheme( 'b2_color' , true) ?>;}
.block2 .political-info h2 a{color: <?php get_option_mmtheme( 'b2_color' , true) ?>;}
.block2 .more-political h3 {background: <?php get_option_mmtheme( 'b2_color' , true) ?>;}

.block3 .political-info{border-color:<?php get_option_mmtheme( 'b3_color' , true) ?>;}
.block3 .political-info h2 a{color: <?php get_option_mmtheme( 'b3_color' , true) ?>;}
.block3 .more-political h3 {background: <?php get_option_mmtheme( 'b3_color' , true) ?>;}

.block4 .political-info{border-color:<?php get_option_mmtheme( 'b4_color' , true) ?>;}
.block4 .political-info h2 a{color: <?php get_option_mmtheme( 'b4_color' , true) ?>;}
.block4 .more-political h3 {background: <?php get_option_mmtheme( 'b4_color' , true) ?>;}

.block5 .political-info{border-color:<?php get_option_mmtheme( 'b5_color' , true) ?>;}
.block5 .political-info h2 a{color: <?php get_option_mmtheme( 'b5_color' , true) ?>;}
.block5 .more-political h3 {background: <?php get_option_mmtheme( 'b5_color' , true) ?>;}

.block6 .political-info{border-color:<?php get_option_mmtheme( 'b6_color' , true) ?>;}
.block6 .political-info h2 a{color: <?php get_option_mmtheme( 'b6_color' , true) ?>;}
.block6 .more-political h3 {background: <?php get_option_mmtheme( 'b6_color' , true) ?>;}

.block7 .political-info{border-color:<?php get_option_mmtheme( 'b7_color' , true) ?>;}
.block7 .political-info h2 a{color: <?php get_option_mmtheme( 'b7_color' , true) ?>;}
.block7 .more-political h3 {background: <?php get_option_mmtheme( 'b7_color' , true) ?>;}

.block8 .political-info{border-color:<?php get_option_mmtheme( 'b8_color' , true) ?>;}
.block8 .political-info h2 a{color: <?php get_option_mmtheme( 'b8_color' , true) ?>;}
.block8 .more-political h3 {background: <?php get_option_mmtheme( 'b8_color' , true) ?>;}

.block9 .political-info{border-color:<?php get_option_mmtheme( 'b9_color' , true) ?>;}
.block9 .political-info h2 a{color: <?php get_option_mmtheme( 'b9_color' , true) ?>;}
.block9 .more-political h3 {background: <?php get_option_mmtheme( 'b9_color' , true) ?>;}

.block10 .political-info{border-color:<?php get_option_mmtheme( 'b10_color' , true) ?>;}
.block10 .political-info h2 a{color: <?php get_option_mmtheme( 'b10_color' , true) ?>;}
.block10 .more-political h3 {background: <?php get_option_mmtheme( 'b10_color' , true) ?>;}
</style>


<?php wp_head(); ?> 
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/responsive.css" type="text/css" media="screen" /> 

<?php if ( get_option_mmtheme('featured_slider') == 'true' ) { ;?> 
<style>.ad-2{margin-top:-18px !important}</style> <?php } ?>
</head>
<body <?php body_class(); ?>>

<?php if ( get_option_mmtheme('ad_1_on_off') == 'true' ) { ;?> 
<div class="ad-1">
<?php echo stripslashes( get_option_mmtheme('ad_1') ) ?> 
</div>
<?php } ?> 

<div id="wrapper">
<div class="top1"><a name="top"></a></div>

<header id="header" class="singleheader">
<div class="top-panel">
<div class="container">
<nav>
<?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'first', 'container_id' => 'topMenu', 'container_class' => 'ddsmoothmenu','top-row', 'fallback_cb'=>'primarymenu1') );?>
</nav> 

<ul class="social"> 
<?php if ( get_option_mmtheme('social8_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social8_link') ) ?>" class="rss">rss</a></li>
<?php } ?>	
<?php if ( get_option_mmtheme('social11_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social11_link') ) ?>" class="vimeo">vimeo</a></li>
<?php } ?>	
<?php if ( get_option_mmtheme('social3_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social3_link') ) ?>" class="reddit">reddit</a></li>
<?php } ?>	
<?php if ( get_option_mmtheme('social10_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social10_link') ) ?>" class="twitter">twitter</a></li>
<?php } ?>
<?php if ( get_option_mmtheme('social12_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social12_link') ) ?>" class="youtube">youtube</a></li>
<?php } ?>
<?php if ( get_option_mmtheme('social7_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social7_link') ) ?>" class="pinterest">pinterest</a></li>
<?php } ?> 
<?php if ( get_option_mmtheme('social6_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social6_link') ) ?>" class="linkedin">linkedin</a></li>
<?php } ?>	
<?php if ( get_option_mmtheme('social5_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social5_link') ) ?>" class="gplus">gplus</a></li>
<?php } ?>	
<?php if ( get_option_mmtheme('social2_on_off') == 'true' ) { ;?>
<li><a href="<?php echo stripslashes( get_option_mmtheme('social2_link') ) ?>" class="facebook">facebook</a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="topic-panel">
<div class="container">
<strong class="title"><?php _e( 'TRENDING Topics', 'mm' ); ?> </strong>
<div class="topic-list">
<?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'second', 'container_id' => 'trending-menu', 'container_class' =>'trending', 'fallback_cb'=>'primarymenu2') );?>
</div>
<div class="cb"> </div>	
</div>
</div>
<div class="container logo-holder">
<div class="carousel">
<?php if ( get_option_mmtheme('top_slider') == 'true' ) { ;?> 
<div class="mask">
<strong class="title"><?php _e( 'Breaking', 'mm' ); ?></strong>

<div id="banner-slide">
<!-- start Basic Jquery Slider -->
<ul class="bjqs">
<?php query_posts("cat=".get_option_mmtheme('top_slider_cat')."&showposts=7"); if (have_posts()) : while (have_posts()) : the_post();?>
<li> <a href="<?php the_permalink(); ?>" rel="bookmark"> <?php the_title(); ?></a></li>
<?php endwhile; ?>
<?php endif; wp_reset_query(); ?> 
</ul> 
<!-- end Basic jQuery Slider --> 
</div>


</div>	
<?php } ?> 
</div>



<div class="topsearch-wrapper">
<form method="get" id="footersearch1" action="<?php bloginfo('url'); ?>/">
<input type="text" name="s" value=" " onblur="if(this.value=='') this.value=' ';" onfocus="if(this.value==' ') this.value='';" id="s2" />
<input type="submit" value=" " id="searchsubmit" />
</form>


</div>
<div class="logo-wrapper">
<div class="head-date"><?php echo date_i18n('F j, Y'); ?></div>
<strong class="logo"><a href="<?php echo get_option('home'); ?>"><img src="<?php echo get_option_mmtheme( 'custom_logo_value' ) ?>" alt="" /> </a></strong>
</div>	
<div class="cb"></div>
</div>



<nav id="nav">
<div class="responsivemenu"> <nav id="mobile-menu" role="navigation"></nav></div>
<div class="menu">
<?php wp_nav_menu( array( 'walker' => new Arrow_Walker_Nav_Menu, 'theme_location' => 'third', 'container_id' => 'menu-22', 'container_class' =>'ddsmoothmenu', 'menu-header', 'fallback_cb'=>'primarymenu3') );?> 
</div>
</nav>




</header>

<section id="main">
<div class="container">
<div class="box">
function.php

<?php require( get_template_directory() . '/includes/jetpack-carousel.php' ); 
if(function_exists('grunion_media_button')) { ?>
<?php } else { ?>
<?php require( get_template_directory() . '/includes/grunion-contact-form/grunion-contact-form.php' ); ?>
<?php } 
add_filter( 'the_category', 'add_nofollow_cat' ); 
function add_nofollow_cat( $text ) { 
$text = str_replace('rel="category tag"', "", $text); return $text; } 
function magazine3_pagination($pages = '', $range = 2)
{ 
$showitems = ($range * 2)+1; 

global $paged;
if(empty($paged)) $paged = 1;

if($pages == '')
{
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages)
{
$pages = 1;
}
} 

if(1 != $pages)
{
echo "<div class='pagination'>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>«</a>";
if($paged > 0 && $showitems < $pages) echo "<a class='firstpag' href='".get_pagenum_link($paged - 1)."'>‹</a>";

for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
}
}

if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>›</a>"; 
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a class='lastpag' href='".get_pagenum_link($pages)."'>»</a>";
echo "</div>\n";
}
}

function the_content_limit($max_char, $more_link_text = ' ', $stripteaser = 0, $more_file = '') {
$content = get_the_content($more_link_text, $stripteaser, $more_file);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
$content = strip_tags($content);
if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) {
$content = substr($content, 0, $espacio);
$content = $content;
echo "<p>";
echo $content;
echo "...<a href='"; the_permalink(); echo "'>"."</a>";
echo "</p>";
} else {
echo "<p>";
echo $content;
echo "...<a href='"; the_permalink(); echo "'>"."</a>";
echo "</p>";
}
} 
/* THUMBNAIL */
if( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );	

add_image_size( 'featuredbig', 644, 322, true ); 
add_image_size( 'featuredsmall', 316, 176, true ); 
add_image_size( 'blockbig', 430, 210, true );
add_image_size( 'blocksmall', 74, 58, true ); 
add_image_size( 'sliderbig', 710, 401, true );
add_image_size( 'slidersmall', 80, 50, true );
add_image_size( 'scrollerimage', 60, 49, true );
add_image_size( 'contentbigcat', 370, 215, true );
add_image_size( 'contentsmall', 195, 110, true );
add_image_size( 'popular-thumb', 84, 55, true ); 
add_image_size( 'sidebar-thumb', 50, 50, true ); 
add_image_size( 'secondpostimg', 104, 75, true ); 

}
/**
* _s functions and definitions 
*
* @package _s
* @since _s 1.0
*/

/**
* Set the content width based on the theme's design and stylesheet.
*
* @since _s 1.0
*/
if ( ! isset( $content_width ) )
$content_width = 640; /* pixels */

if ( ! function_exists( '_s_setup' ) ):
/**
* Sets up theme defaults and registers support for various WordPress features.
*
* Note that this function is hooked into the after_setup_theme hook, which runs
* before the init hook. The init hook is too late for some features, such as indicating
* support post thumbnails.
*
* @since _s 1.0
*/

function _s_setup() {

/**
* Custom template tags for this theme.
*/
require( get_template_directory() . '/includes/core/template-tags.php' );

/**
* Custom functions that act independently of the theme templates
*/
//require( get_template_directory() . '/includes/core/tweaks.php' );


/**
* Make theme available for translation
* Translations can be filed in the /languages/ directory
* If you're building a theme based on _s, use a find and replace
* to change '_s' to the name of your theme in all the template files
*/
load_theme_textdomain( '_s', get_template_directory() . '/languages' );
$locale = get_locale();
$locale_file = get_template_directory() . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );

/**
* Add default posts and comments RSS feed links to head
*/
add_theme_support( 'automatic-feed-links' );
}
endif; // _s_setup
add_action( 'after_setup_theme', '_s_setup' );

/**
* Register widgetized area and update sidebar with default widgets
*
* @since _s 1.0
*/
function _s_widgets_init() {
register_sidebar( array(
'name' => ( 'Single Sidebar' ),
'id' => 'sidebar-2',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</div></aside>",
'before_title' => '<div class="widget-title">',
'after_title' => '</div><div class="widget_container">',
) );
register_sidebar( array(
'name' => ( 'Archive Sidebar' ),
'id' => 'sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => "</div></aside>",
'before_title' => '<div class="widget-title">',
'after_title' => '</div><div class="widget_container">',
) );

register_sidebar( array(
'name' => 'Footer Block 1',
'description' => __( 'Footer Block 1', "mm"),
'before_widget' => ' <div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'	
) );
register_sidebar( array(
'name' => 'Footer Block 2',
'description' => __( 'Footer Block 2', "mm"),
'before_widget' => ' <div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'	
) );
register_sidebar( array(
'name' => 'Footer Block 3', 
'description' => __( 'Footer Block 3', "mm"),
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'	
) );
register_sidebar( array(
'name' => 'Footer Block 4', 
'description' => __( 'Footer Block 4', "mm"),
'before_widget' => '<div class="widget">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>'	
) );	
}
add_action( 'widgets_init', '_s_widgets_init' );

/**
* Enqueue scripts and styles
*/
function mm_admin_styles() {
wp_enqueue_style('color-picker', get_template_directory_uri() .'/includes/overall.css');
}
add_action('admin_print_styles', 'mm_admin_styles');

function _s_scripts() {
global $post;

wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_script( 'jquery' );

if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}

if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', '_s_scripts' );

/* ----------- Comments BOXES --------------- */
function thecomment($comment, $args, $depth) {
$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
<div class="the-comment">
<?php echo get_avatar($comment,$size='60'); ?>
<div class="comment-arrow"></div>
<div class="comment-box">	<div class="comment-author">
<strong><?php echo get_comment_author_link() ?></strong>
<small><?php printf(__('%1$s at %2$s', "mm"), get_comment_date(), get_comment_time()) ?></a><?php edit_comment_link(__('Edit', "mm"),' ','') ?> - <?php comment_reply_link(array_merge( $args, array('reply_text' => 'Reply', 'add_below' => $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?></small>
</div>
<div class="comment-text">
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('Your comment is awaiting moderation.', "mm") ?></em>
<br />
<?php endif; ?>
<?php comment_text() ?>
</div> </div> </div>
<?php } 


/**
* Implement the Custom Header feature
*/
//require( get_template_directory() . '/inc/custom-header.php' );

/* MM Panel */
require( get_template_directory() . '/includes/mm/mm.php' );
require( get_template_directory() . '/includes/mm/mm-includes.php' );
/* JS */
require( get_template_directory() . '/includes/theme-js.php' );
require( get_template_directory() . '/includes/w.php' );
require( get_template_directory() . '/includes/update_notifier.php' );

Partajează acest post


Link spre post
Distribuie pe alte site-uri

Creează un cont sau autentifică-te pentru a adăuga comentariu

Trebuie să fi un membru pentru a putea lăsa un comentariu.

Creează un cont

Înregistrează-te pentru un nou cont în comunitatea nostră. Este simplu!

Înregistrează un nou cont

Autentificare

Ai deja un cont? Autentifică-te aici.

Autentifică-te acum

×