Advertisement
baofengyu

DNN_Theme

Feb 7th, 2014
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.47 KB | None | 0 0
  1. Header-
  2.  
  3. '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  4.     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  5.  
  6. <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
  7.  
  8. <head profile="http://gmpg.org/xfn/11">
  9.    
  10.     <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
  11.    
  12.     <?php if (is_search()) { ?>
  13.        <meta name="robots" content="noindex, nofollow" />
  14.     <?php } ?>
  15.  
  16.     <title>
  17.            <?php
  18.               if (function_exists('is_tag') && is_tag()) {
  19.                  single_tag_title("Tag Archive for &quot;"); echo '&quot; - '; }
  20.               elseif (is_archive()) {
  21.                  wp_title(''); echo ' Archive - '; }
  22.               elseif (is_search()) {
  23.                  echo 'Search for &quot;'.wp_specialchars($s).'&quot; - '; }
  24.               elseif (!(is_404()) && (is_single()) || (is_page())) {
  25.                  wp_title(''); echo ' - '; }
  26.               elseif (is_404()) {
  27.                  echo 'Not Found - '; }
  28.               if (is_home()) {
  29.                  bloginfo('name'); echo ' - '; bloginfo('description'); }
  30.               else {
  31.                   bloginfo('name'); }
  32.               if ($paged>1) {
  33.                  echo ' - page '. $paged; }
  34.            ?>
  35.     </title>
  36.    
  37.     <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  38.    
  39.     <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
  40.    
  41.     <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
  42.  
  43.     <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
  44.  
  45.     <?php wp_head(); ?>
  46.    
  47. </head>
  48.  
  49. <body <?php body_class(); ?>>
  50.    
  51.     <div class="container">
  52.   <div class="header"><a href="#"><img src="images/DnnLogov3small.png" alt="Digital Now News" name="Insert_logo" width="20%" height="90" id="Insert_logo"/></a>
  53.   </div>
  54.   <div id="title">
  55.     <h1>Digital Now News</h1>
  56.     </div>
  57.  
  58.     <!-- end .header --></div>'
  59.  
  60. Index-
  61.  
  62. '<?php get_header(); ?>
  63.  
  64. <?php get_sidebar(); ?>
  65.  
  66.  <div class="content">
  67.    
  68.     <section id="mainstory">
  69. <div id="slides">
  70.             <div class="slides_container">
  71.             <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
  72.  
  73.             $args = array(
  74.                'post_type' => 'attachment',
  75.                'numberposts' => -1,
  76.                'orderby'=> 'menu_order',
  77.                'order' => 'ASC',
  78.                'post_mime_type' => 'image',
  79.                'post_status' => null,
  80.                'post_parent' => $post->ID
  81.               );
  82.  
  83.               $attachments = get_posts( $args );
  84.                  if ( $attachments ) {
  85.                     foreach ( $attachments as $attachment ) {
  86.                         echo '<div>';
  87.                         echo wp_get_attachment_image( $attachment->ID , 'full' );
  88.                         echo '</div>';
  89.                       }
  90.                  }
  91.              endwhile; endif; ?>
  92.             </div>
  93.             <a href="#" class="prev"><img src="<?php bloginfo('template_directory')?>/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
  94.             <a href="#" class="next"><img src="<?php bloginfo('template_directory')?>/images/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
  95.         </div> 
  96.    
  97.        </section>
  98.    
  99.     <section id="newsfeed">
  100.     <?php//newsfeed php
  101.     $third_query=new WP_Query('cat=1&showposts=5$paged='.$paged);
  102.     while($third_query->have_posts()):$third_query->the_post();
  103.         the_content();
  104.     endwhile;
  105.         next_posts_link();previous_posts_link();
  106.     wp_reset_postdata();
  107.     ?>
  108.    
  109.     </section>
  110.    
  111.     <section id="topstories">
  112.     <div id="storya">
  113.     <?php
  114.     $fourth_query=new WP_Query('cat=1&showposts=1$paged='.$paged);
  115.     while($fourth_query->have_posts()):$fourth_query->the_post();
  116.         the_content();
  117.     endwhile;
  118.         next_posts_link();previous_posts_link();
  119.     wp_reset_postdata();
  120.     ?>
  121.  
  122.     </div>
  123.    
  124.     <div id="storyb">
  125.     <?php
  126.     $fifth_query=new WP_Query('cat=2&showposts=1$paged='.$paged);
  127.     while($fifth_query->have_posts()):$fifth_query->the_post();
  128.         the_content();
  129.     endwhile;
  130.         next_posts_link();previous_posts_link();
  131.     wp_reset_postdata();
  132.     ?>
  133.    
  134.     </div>
  135.    
  136.     <div id="storyc">
  137.     <?php
  138.     $sixth_query=new WP_Query('cat=3&showposts=1$paged='.$paged);
  139.     while($sixth_query->have_posts()):$sixth_query->the_post();
  140.         the_content();
  141.     endwhile;
  142.         next_posts_link();previous_posts_link();
  143.     wp_reset_postdata();
  144.     ?>
  145.    
  146.     </div>
  147.    
  148.     <div id="storyd">
  149.     <?php
  150.     $seventh_query=new WP_Query('cat=4&showposts=1$paged='.$paged);
  151.     while($seventh_query->have_posts()):$seventh_query->the_post();
  152.         the_content();
  153.     endwhile;
  154.         next_posts_link();previous_posts_link();
  155.     wp_reset_postdata();
  156.     ?>
  157.    
  158.     </div>
  159.    
  160.     <div id="storye">
  161.     <?php
  162.     $eighth_query=new WP_Query('cat=5&showposts=1$paged='.$paged);
  163.     while($eighth_query->have_posts()):$eighth_query->the_post();
  164.         the_content();
  165.     endwhile;
  166.         next_posts_link();previous_posts_link();
  167.     wp_reset_postdata();
  168.     ?>
  169.      
  170.       </div>
  171.      
  172.     <div id="storyf">
  173.     <?php
  174.     $ninth_query=new WP_Query('cat=6&showposts=1$paged='.$paged);
  175.     while($ninth_query->have_posts()):$ninth_query->the_post();
  176.         the_content();
  177.     endwhile;
  178.         next_posts_link();previous_posts_link();
  179.     wp_reset_postdata();
  180.     ?>
  181.    
  182.     </div>
  183.     </section>
  184.     <!-- end .content --></div>
  185.  
  186. <?php get_sidebar("secondary"); ?>
  187.  
  188. <?php get_footer(); ?>'
  189.  
  190. sidebar-
  191. '  <div class="sidebar1">
  192.     <!--Static content could go above Widgetized area.-->
  193.    
  194.     <?php if (!function_exists('dynamic_sidebar')||
  195.                 !dynamic_sidebar('Sidebar Widgets'));
  196.     ?>
  197.    
  198.     Content in here will only show if there are no widgets active, or if the version of wordpress running doesn't support widgets.  Otherwise, this area is where the widgets go, set via the Admin.
  199.    
  200.     <?php endif; ?>
  201.    
  202.  
  203.     <!-- end .sidebar1 --></div>'
  204.  
  205. Functions-
  206. '<?php
  207. // in the function below, I am using my blm prefix. If you have one of your own, you might want to use it.
  208. // Don't forget that it's used twice. Make sure to change both instances.
  209.  
  210. function blm_init_method() {
  211.     /* Enqueue custom Javascript here using wp_enqueue_script().
  212.     http://codex.wordpress.org/Function_Reference/wp_enqueue_script*/
  213.    
  214.         wp_enqueue_script( 'jquery' );
  215.         wp_enqueue_script( 'easing', get_template_directory_uri().'/js/jquery.easing.js', array( 'jquery' ), '1.3' );
  216.         wp_enqueue_script( 'slides', get_template_directory_uri().'/js/slides.min.jquery.js', array( 'jquery', 'easing' ) );
  217.  
  218.     }
  219.     add_action('wp_enqueue_scripts', 'blm_init_method');
  220.  
  221. //activate widget area
  222.  
  223. if (function_exists('register_sidebar')) {
  224.     register_sidebar(array(
  225.         'name'=>'Sidebar Widgets',
  226.         'before_widget'=>'<div id="%1$s" class="widget %2$s">',
  227.         'after_widget'=>'</div>',
  228.         'before_title'=>'<h4 class="widgettitle">',
  229.         'after_title'=>'</h4>',
  230.     ));
  231. }
  232. ?>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement