コード例 #1
0
    public static function content_posts_for_home()
    {
        global $wp_query, $paged, $wdwt_front;
        $hide_content_posts = $wdwt_front->get_param('hide_content_posts');
        $hide_video_post = $wdwt_front->get_param('hide_video_post');
        $date_enable = $wdwt_front->get_param('date_enable');
        $blog_style = $wdwt_front->get_param('blog_style');
        $grab_image = $wdwt_front->get_param('grab_image');
        if (is_home()) {
            ?>
<div id="blog" class="blog" ><?php 
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
    <div class="blog-post home-post">        
      <a class="title_href" href="<?php 
                    echo get_permalink();
                    ?>
">
         <h2><?php 
                    the_title();
                    ?>
</h2>
      </a><?php 
                    if ($date_enable) {
                        ?>
         <div class="home-post-date">
          <?php 
                        echo news_magazine_frontend_functions::posted_on();
                        ?>
         </div>
        <?php 
                    }
                    ?>
         <div class="img_container unfixed clear"> 
         <?php 
                    if (has_post_thumbnail() || news_magazine_frontend_functions::post_image_url() && $blog_style && $grab_image) {
                        echo news_magazine_frontend_functions::auto_thumbnail($grab_image);
                    }
                    ?>
         </div>
         <?php 
                    if ($blog_style) {
                        the_excerpt();
                    } else {
                        the_content(__('More', "news-magazine"));
                    }
                    ?>
<div class="clear"></div>  
      
    </div>
    <?php 
                }
                if ($wp_query->max_num_pages > 2) {
                    ?>
      <div class="page-navigation">
        <?php 
                    posts_nav_link();
                    ?>
      </div>     
    <?php 
                }
            }
            ?>
    <div class="clear"></div><?php 
            $wdwt_front->bottom_advertisment();
            wp_reset_query();
            ?>
      
  </div>
  <?php 
        } else {
            ?>
   <div id="content">
     <?php 
            if (have_posts()) {
                while (have_posts()) {
                    the_post();
                    ?>
      <div class="single-post">
       <h2><?php 
                    the_title();
                    ?>
</h2>
       <div class="entry"><?php 
                    the_content();
                    ?>
</div>
      </div>
    <?php 
                }
                ?>
       <div class="navigation">
        <?php 
                posts_nav_link();
                ?>
       </div>

    <?php 
            }
            ?>
     <div class="clear"></div>
     <?php 
            wp_reset_query();
            if (comments_open()) {
                ?>
          <div class="comments-template">
            <?php 
                echo comments_template();
                ?>
          </div>
      
      <?php 
            }
            ?>
 
   </div>
 
 <?php 
        }
    }
コード例 #2
0
ファイル: front-page.php プロジェクト: jimdough/Roadmaster
    dynamic_sidebar('sidebar-1');
    ?>
					<div class="clear"></div>
				</div>
			</aside>
		<?php 
}
?>
		<div id="content">
		<?php 
if ('posts' == get_option('show_on_front')) {
    news_magazine_frontend_functions::top_posts();
    news_magazine_frontend_functions::content_posts();
    news_magazine_frontend_functions::categories_vertical_tabs();
} elseif ('page' == get_option('show_on_front')) {
    news_magazine_frontend_functions::content_posts_for_home();
}
?>
		
		</div>
	   <?php 
if (is_active_sidebar('sidebar-2')) {
    ?>
		<aside id="sidebar2">
			<div class="sidebar-container">
			  <?php 
    dynamic_sidebar('sidebar-2');
    ?>
			  <div class="clear"></div>
			</div>
		</aside>
コード例 #3
0
ファイル: single.php プロジェクト: jimdough/Roadmaster
				<?php 
        if ($wdwt_front->get_param('date_enable', $news_magazine_meta, false)) {
            ?>
				<div class="entry-meta">
					  <?php 
            news_magazine_frontend_functions::posted_on_single();
            ?>
				</div>
				<?php 
            news_magazine_frontend_functions::entry_meta_cat();
        }
        ?>
				<?php 
        $wdwt_front->integration_bottom();
        wp_link_pages(array('before' => '<div class="page-links"><span class="page-links-title">' . __('Page', "news-magazine") . '</span>', 'after' => '</div>', 'link_before' => '<span class="page-links-number">', 'link_after' => '</span>'));
        news_magazine_frontend_functions::post_nav();
        ?>
				<div class="clear"></div>
				
				<?php 
        $wdwt_front->bottom_advertisment();
        if (comments_open()) {
            ?>
					<div class="comments-template">
						<?php 
            echo comments_template();
            ?>
						<div class="clear"></div>
					</div>
				<?php 
        }
コード例 #4
0
ファイル: search.php プロジェクト: jimdough/Roadmaster
                 <div class="search-result">
                    <h3>
                        <a href="<?php 
        the_permalink();
        ?>
"><?php 
        the_title();
        ?>
</a>
                    </h3>
                    <div class="entry">
                        <?php 
        if ($blog_style) {
            ?>
                          <p><?php 
            news_magazine_frontend_functions::the_excerpt_max_charlength(250);
            ?>
</p>
                          <?php 
        } else {
            the_content();
        }
        ?>
                    </div>
                </div>
				<?php 
    }
    ?>
				<div class="page-navigation">
					<?php 
    posts_nav_link();
コード例 #5
0
ファイル: functions.php プロジェクト: jimdough/Roadmaster
function wdwt_front_pages()
{
    global $wdwt_options;
    global $wdwt_front;
    require_once 'inc/front/front_params_output.php';
    $wdwt_front = new news_magazine_front($wdwt_options);
    $action = $_REQUEST['action'];
    $paged = isset($_REQUEST['paged']) ? intval($_REQUEST['paged']) : 0;
    if ($action == "wdwt_front_content_posts_section") {
        require_once 'inc/front/front_functions.php';
        news_magazine_frontend_functions::content_posts($paged);
    }
    if ($action == "wdwt_front_top_posts_section") {
        require_once 'inc/front/front_functions.php';
        news_magazine_frontend_functions::top_posts($paged);
    }
    die;
}
コード例 #6
0
ファイル: index.php プロジェクト: jimdough/Roadmaster
        ?>
</h2>
					</a><?php 
        if ($date_enable) {
            ?>
                         <div class="home-post-date">
                            <?php 
            echo news_magazine_frontend_functions::posted_on();
            ?>
                         </div>
						<?php 
        }
        if ($grab_image) {
            echo news_magazine_frontend_functions::display_thumbnail(150, 150);
        } else {
            echo news_magazine_frontend_functions::thumbnail(150, 150);
        }
        if ($blog_style) {
            the_excerpt();
        } else {
            the_content(__('More', "news-magazine"));
        }
        ?>
<div class="clear"></div>	
					
				</div>
				<?php 
    }
    if ($wp_query->max_num_pages > 2) {
        ?>
					<div class="page-navigation">
コード例 #7
0
    function widget($args, $instance)
    {
        extract($args);
        $title = esc_html($instance['title']);
        $categ_id = empty($instance['categ_id']) ? '' : $instance['categ_id'];
        $post_count = empty($instance['post_count']) ? '' : $instance['post_count'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		
        <style>	
		 .widget-title{
		   margin-bottom: 0;
		 }
		 .widget_news_magazine_events_categ div:last-child div{
		   border-bottom:0;
		 }
        </style>		
		<?php 
        $wp_query = null;
        $wp_query = new WP_Query();
        if (!isset($post_count)) {
            $post_count = 0;
        }
        $wp_query->query('posts_per_page=' . $post_count . '&cat=' . $categ_id);
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            ?>
		
			    	<div class="events">
					  <div class="events-widg">	
					     <a class="title_href" href="<?php 
            echo get_permalink();
            ?>
">
							<span class="date">
              <?php 
            $day = 'd';
            $month = 'M';
            ?>
                <h3><span class="events-day"><?php 
            the_time($day);
            ?>
</span></h3>
                <span class="events-month"><?php 
            the_time($month);
            ?>
</span>
							</span>
						 </a>	
						 <p>
							<?php 
            echo news_magazine_frontend_functions::the_excerpt_max_charlength(100);
            ?>
						 </p>						     
					  </div>
                      		   
					</div>
					
					<?php 
        }
        echo $after_widget;
    }
コード例 #8
0
ファイル: archive.php プロジェクト: jimdough/Roadmaster
        }
        ?>
			<p><a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title_attribute();
        ?>
" rel="bookmark"><?php 
        _e('Read more', "news-magazine");
        ?>
 &raquo;</a></p>
		</div>
        <?php 
        if ($date_enable) {
            news_magazine_frontend_functions::entry_meta();
        }
        ?>
		<?php 
    }
    ?>
		<div class="page-navigation">
		     <?php 
    posts_nav_link();
    ?>
	    </div>
	<?php 
} else {
    ?>

		<h3 class="archive-header"><?php 
コード例 #9
0
    function widget($args, $instance)
    {
        extract($args);
        $title = esc_html($instance['title']);
        $categ_id = empty($instance['categ_id']) ? '' : $instance['categ_id'];
        $post_count = empty($instance['post_count']) ? '' : $instance['post_count'];
        echo $before_widget;
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        ?>
		
        <style>	
		 .cat_widg p {
			margin: 0 0 13px !important;
         }
		 .cat_widg {
            padding-bottom: 10px;
			margin-bottom: 5px;
            border-bottom: 1px solid #ededed;
			float: left;
			width: 100%;
         }			
         .widget_exclusive_categ div:last-child div{
		    border-bottom:none !important;
         } 
         .cat_widg_cont {		 		  
           width: 100%;
		 }
		 .cat_widg_cont h3{
		   font-size: 19px !important;
		   margin-top: 0;
           line-height: 15px;
           margin-bottom: 8px !important;
		 }
		 .cat_widg_cont h3 a{
		   font-size:19px !important;
		 }
		 .widget-title{
		   margin-bottom: 0;
		 }
		 .cat_widg-img{
		    width: 90px;
			height: 70px;
			float: left;
			overflow: hidden;
			margin: 0 10px 10px 0 !important;

		}
        </style>		
		<?php 
        $wp_query = null;
        $wp_query = new WP_Query();
        if (!isset($post_count)) {
            $post_count = 0;
        }
        $wp_query->query('posts_per_page=' . $post_count . '&cat=' . $categ_id);
        while ($wp_query->have_posts()) {
            $wp_query->the_post();
            ?>
		
			    <div class="cat_widg_cont">
					  <a href="<?php 
            the_permalink();
            ?>
">
						  <span style="font-size: 17px;"><?php 
            the_title();
            ?>
</span>
					  </a>
					  <div class="cat_widg">
						   <a href="<?php 
            the_permalink();
            ?>
">	
							  <div class="cat_widg-img">
								 <?php 
            echo news_magazine_frontend_functions::fixed_thumbnail(150, 70);
            ?>
							  </div>
						  </a>	  
						  <p>
							  <?php 
            echo news_magazine_frontend_functions::the_excerpt_max_charlength(100);
            ?>
						  </p>	
					  </div>
                      <div style="clear:both;"></div>				   
				</div>
					
	<?php 
        }
        echo $after_widget;
    }