Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Header-
- '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
- <head profile="http://gmpg.org/xfn/11">
- <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
- <?php if (is_search()) { ?>
- <meta name="robots" content="noindex, nofollow" />
- <?php } ?>
- <title>
- <?php
- if (function_exists('is_tag') && is_tag()) {
- single_tag_title("Tag Archive for ""); echo '" - '; }
- elseif (is_archive()) {
- wp_title(''); echo ' Archive - '; }
- elseif (is_search()) {
- echo 'Search for "'.wp_specialchars($s).'" - '; }
- elseif (!(is_404()) && (is_single()) || (is_page())) {
- wp_title(''); echo ' - '; }
- elseif (is_404()) {
- echo 'Not Found - '; }
- if (is_home()) {
- bloginfo('name'); echo ' - '; bloginfo('description'); }
- else {
- bloginfo('name'); }
- if ($paged>1) {
- echo ' - page '. $paged; }
- ?>
- </title>
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
- <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" />
- <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
- <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
- <?php wp_head(); ?>
- </head>
- <body <?php body_class(); ?>>
- <div class="container">
- <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>
- </div>
- <div id="title">
- <h1>Digital Now News</h1>
- </div>
- <!-- end .header --></div>'
- Index-
- '<?php get_header(); ?>
- <?php get_sidebar(); ?>
- <div class="content">
- <section id="mainstory">
- <div id="slides">
- <div class="slides_container">
- <?php if ( have_posts() ) : while ( have_posts() ) : the_post();
- $args = array(
- 'post_type' => 'attachment',
- 'numberposts' => -1,
- 'orderby'=> 'menu_order',
- 'order' => 'ASC',
- 'post_mime_type' => 'image',
- 'post_status' => null,
- 'post_parent' => $post->ID
- );
- $attachments = get_posts( $args );
- if ( $attachments ) {
- foreach ( $attachments as $attachment ) {
- echo '<div>';
- echo wp_get_attachment_image( $attachment->ID , 'full' );
- echo '</div>';
- }
- }
- endwhile; endif; ?>
- </div>
- <a href="#" class="prev"><img src="<?php bloginfo('template_directory')?>/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
- <a href="#" class="next"><img src="<?php bloginfo('template_directory')?>/images/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
- </div>
- </section>
- <section id="newsfeed">
- <?php//newsfeed php
- $third_query=new WP_Query('cat=1&showposts=5$paged='.$paged);
- while($third_query->have_posts()):$third_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </section>
- <section id="topstories">
- <div id="storya">
- <?php
- $fourth_query=new WP_Query('cat=1&showposts=1$paged='.$paged);
- while($fourth_query->have_posts()):$fourth_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- <div id="storyb">
- <?php
- $fifth_query=new WP_Query('cat=2&showposts=1$paged='.$paged);
- while($fifth_query->have_posts()):$fifth_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- <div id="storyc">
- <?php
- $sixth_query=new WP_Query('cat=3&showposts=1$paged='.$paged);
- while($sixth_query->have_posts()):$sixth_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- <div id="storyd">
- <?php
- $seventh_query=new WP_Query('cat=4&showposts=1$paged='.$paged);
- while($seventh_query->have_posts()):$seventh_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- <div id="storye">
- <?php
- $eighth_query=new WP_Query('cat=5&showposts=1$paged='.$paged);
- while($eighth_query->have_posts()):$eighth_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- <div id="storyf">
- <?php
- $ninth_query=new WP_Query('cat=6&showposts=1$paged='.$paged);
- while($ninth_query->have_posts()):$ninth_query->the_post();
- the_content();
- endwhile;
- next_posts_link();previous_posts_link();
- wp_reset_postdata();
- ?>
- </div>
- </section>
- <!-- end .content --></div>
- <?php get_sidebar("secondary"); ?>
- <?php get_footer(); ?>'
- sidebar-
- ' <div class="sidebar1">
- <!--Static content could go above Widgetized area.-->
- <?php if (!function_exists('dynamic_sidebar')||
- !dynamic_sidebar('Sidebar Widgets'));
- ?>
- 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.
- <?php endif; ?>
- <!-- end .sidebar1 --></div>'
- Functions-
- '<?php
- // in the function below, I am using my blm prefix. If you have one of your own, you might want to use it.
- // Don't forget that it's used twice. Make sure to change both instances.
- function blm_init_method() {
- /* Enqueue custom Javascript here using wp_enqueue_script().
- http://codex.wordpress.org/Function_Reference/wp_enqueue_script*/
- wp_enqueue_script( 'jquery' );
- wp_enqueue_script( 'easing', get_template_directory_uri().'/js/jquery.easing.js', array( 'jquery' ), '1.3' );
- wp_enqueue_script( 'slides', get_template_directory_uri().'/js/slides.min.jquery.js', array( 'jquery', 'easing' ) );
- }
- add_action('wp_enqueue_scripts', 'blm_init_method');
- //activate widget area
- if (function_exists('register_sidebar')) {
- register_sidebar(array(
- 'name'=>'Sidebar Widgets',
- 'before_widget'=>'<div id="%1$s" class="widget %2$s">',
- 'after_widget'=>'</div>',
- 'before_title'=>'<h4 class="widgettitle">',
- 'after_title'=>'</h4>',
- ));
- }
- ?>'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement