Advertisement
Guest User

fdsafdsafdsafdsafdsa

a guest
Jul 20th, 2013
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.22 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. Template Name: Blog
  5. */
  6.  
  7. $page = get_page($post->ID);
  8. $current_page_id = $page->ID;
  9.  
  10. $page_title = get_post_meta($current_page_id, 'page_title', true);
  11.  
  12. $page_slider = get_post_meta($current_page_id, 'page_slider', true);
  13.  
  14. $page_bg_image = get_post_meta($current_page_id, 'page_bg', true);
  15.  
  16. get_header(); ?>
  17. <!-- this is index.php -->
  18.  
  19. <?php if($page_slider == "LayerSlider") : ?>
  20.  
  21. <!-- Parallax Container -->
  22. <div id="layerslider">
  23.  
  24.  
  25. <?php
  26.  
  27. $page_layer_slider_shortcode = get_post_meta($current_page_id, 'page_layer_slider_shortcode', true);
  28.  
  29. if(!empty($page_layer_slider_shortcode))
  30. {
  31. ?>
  32.  
  33. <?php echo do_shortcode($page_layer_slider_shortcode); ?>
  34.  
  35. <?php } else { ?>
  36.  
  37. <?php echo do_shortcode('[layerslider id="1"]'); ?>
  38.  
  39. <?php } ?>
  40.  
  41. </div>
  42. <!-- End Parallax Container -->
  43.  
  44. <?php elseif ($page_slider == "FlexSlider") : ?>
  45.  
  46. <!-- Slideshow Container -->
  47. <div class="container_wrap" id="slideshow_big">
  48.  
  49. <?php
  50.  
  51. /* add javascript */
  52. wp_enqueue_script( 'agurghis-flexslider' );
  53.  
  54. ?>
  55.  
  56. <script type='text/javascript'>
  57. jQuery(function() {
  58. jQuery('.flexslider').flexslider();
  59. });
  60. </script>
  61.  
  62. <!-- start header -->
  63. <div class="container" style="position:relative; z-index:2;">
  64.  
  65. <div class="flexslider">
  66. <ul class="slides">
  67. <?php
  68.  
  69. global $my_query;
  70.  
  71. $my_query = new WP_Query('post_type=flex_sldr'); while ($my_query->have_posts()) : $my_query->the_post();
  72.  
  73. $custom = get_post_custom($post->ID);
  74.  
  75. $image_id = get_post_thumbnail_id();
  76. $image_url = wp_get_attachment_image_src($image_id,'large', true);
  77.  
  78. $link_url = get_post_meta($post->ID, 'flex_sldr_link_url', true);
  79.  
  80. if(empty($link_url))
  81. { ?>
  82.  
  83. <li>
  84. <?php if($post->post_content=="") : ?>
  85. <!-- Do stuff with empty posts (or leave blank to skip empty posts) -->
  86. <?php else : ?>
  87. <?php the_content(); ?>
  88. <?php endif; ?>
  89.  
  90. <?php the_post_thumbnail('header_image'); ?>
  91.  
  92. </li>
  93.  
  94.  
  95. <?php } else { ?>
  96.  
  97. <li>
  98.  
  99. <?php if($post->post_content=="") : ?>
  100. <!-- Do stuff with empty posts (or leave blank to skip empty posts) -->
  101. <?php else : ?>
  102. <?php the_content(); ?>
  103. <?php endif; ?>
  104.  
  105. <a href="<?php echo $link_url; ?>"><?php the_post_thumbnail('header_image'); ?></a>
  106.  
  107. </li>
  108.  
  109. <?php } ?>
  110.  
  111. <?php endwhile; ?>
  112. </ul>
  113. </div>
  114.  
  115. </div>
  116. <!-- end header -->
  117. </div>
  118. <!-- End Slideshow Container -->
  119.  
  120. <?php elseif ($page_slider == "Featured List") : ?>
  121.  
  122. <!-- Slideshow Container -->
  123. <div class="container_wrap" id="slideshow_big">
  124.  
  125. <?php
  126.  
  127. /* add javascript */
  128. wp_enqueue_script( 'agurghis-featureList' );
  129.  
  130. ?>
  131.  
  132. <script type='text/javascript'>
  133. jQuery(function() {
  134. // Featured List
  135. jQuery.featureList(
  136. jQuery("#tabs li a"),
  137. jQuery("#output li"), {
  138. start_item : 0
  139. }
  140. );
  141. });
  142. </script>
  143.  
  144. <!-- start header -->
  145. <div class="container" style="position:relative; z-index:2;">
  146.  
  147. <div id="featured">
  148.  
  149. <div id="feature_list">
  150.  
  151. <ul id="tabs">
  152.  
  153. <?php
  154.  
  155. global $my_query;
  156.  
  157. $my_query = new WP_Query('post_type=feat_list&showposts=4'); while ($my_query->have_posts()) : $my_query->the_post();
  158.  
  159. $custom = get_post_custom($post->ID);
  160.  
  161. $image_id = get_post_thumbnail_id();
  162. $image_url = wp_get_attachment_image_src($image_id,'large', true);
  163.  
  164. $link_url = get_post_meta($post->ID, 'feat_list_link_url', true);
  165.  
  166. ?>
  167.  
  168. <li><a href="javascript:;"> <span class="title"><?php the_title(); ?></span><br />
  169. <span><?php the_content(); ?></span></a></li>
  170.  
  171. <?php endwhile; ?>
  172.  
  173. <div class="featured-list-tabs-bg"></div>
  174.  
  175. </ul>
  176.  
  177. <ul id="output">
  178.  
  179. <?php
  180.  
  181. global $my_query;
  182.  
  183. $my_query = new WP_Query('post_type=feat_list&showposts=4'); while ($my_query->have_posts()) : $my_query->the_post();
  184.  
  185. $custom = get_post_custom($post->ID);
  186.  
  187. $image_id = get_post_thumbnail_id();
  188. $image_url = wp_get_attachment_image_src($image_id,'large', true);
  189.  
  190. $link_url = get_post_meta($post->ID, 'feat_list_link_url', true);
  191.  
  192. $link_text = get_post_meta($post->ID, 'feat_list_link_text', true);
  193.  
  194. ?>
  195.  
  196. <li> <?php the_post_thumbnail('featured_list_image'); ?> <a href="<?php echo $link_url; ?>"><?php echo $link_text; ?></a></li>
  197.  
  198. <?php endwhile; ?>
  199.  
  200. </ul>
  201.  
  202. </div>
  203.  
  204. </div>
  205.  
  206. </div>
  207. <!-- end header -->
  208. </div>
  209. <!-- End Slideshow Container -->
  210.  
  211. <?php elseif ($page_slider == "3D Gallery") : ?>
  212.  
  213. <!-- Slideshow Container -->
  214. <div class="container_wrap" id="slideshow_big">
  215.  
  216. <?php
  217.  
  218. /* add javascript */
  219. wp_enqueue_script( 'agurghis-3d-gallery' );
  220.  
  221. ?>
  222.  
  223. <script type='text/javascript'>
  224. jQuery(function() {
  225. jQuery('#dg-container').gallery();
  226. });
  227. </script>
  228.  
  229. <!-- start header -->
  230. <div class="container" style="position:relative; z-index:2;">
  231.  
  232. <section id="dg-container" class="dg-container">
  233. <div class="dg-wrapper">
  234.  
  235. <?php
  236.  
  237. global $my_query;
  238.  
  239. $my_query = new WP_Query('post_type=3d_gallery'); while ($my_query->have_posts()) : $my_query->the_post();
  240.  
  241. $custom = get_post_custom($post->ID);
  242.  
  243. $image_id = get_post_thumbnail_id();
  244. $image_url = wp_get_attachment_image_src($image_id,'large', true);
  245.  
  246. $link_url = get_post_meta($post->ID, '3d_gallery_link_url', true);
  247.  
  248.  
  249. ?>
  250.  
  251. <a href="<?php echo $link_url; ?>"><?php the_post_thumbnail('3d_gallery'); ?><div><?php the_title(); ?></div></a>
  252.  
  253. <?php endwhile; ?>
  254.  
  255. </div>
  256. <nav>
  257. <span class="dg-prev">&lt;</span>
  258. <span class="dg-next">&gt;</span>
  259. </nav>
  260. </section>
  261.  
  262. </div>
  263. <!-- end header -->
  264. </div>
  265. <!-- End Slideshow Container -->
  266.  
  267. <?php elseif ($page_slider == "Recent Posts") : ?>
  268.  
  269. <!-- Slideshow Container -->
  270. <div class="container_wrap" id="slideshow_big">
  271.  
  272. <?php
  273.  
  274. /* add javascript */
  275. wp_enqueue_script( 'agurghis-flexslider' );
  276.  
  277. ?>
  278.  
  279. <script type='text/javascript'>
  280. jQuery(function() {
  281. jQuery('.flexslider').flexslider();
  282. });
  283. </script>
  284.  
  285. <!-- start header -->
  286. <div class="container" style="position:relative; z-index:2;">
  287.  
  288. <div class="flexslider" id="flex-posts">
  289. <ul class="slides">
  290. <?php
  291.  
  292. global $my_query;
  293.  
  294. $temp = $my_query;
  295.  
  296.  
  297.  
  298. $args=array(
  299. 'showposts'=>5,
  300. );
  301.  
  302. $my_query = new WP_Query($args);
  303.  
  304. while ($my_query->have_posts()) : $my_query->the_post();
  305.  
  306. ?>
  307.  
  308. <li>
  309.  
  310. <div class='three_fifth first' style="margin-bottom: 0;">
  311. <div class='circle-nav'>
  312. <div class='cn-nav'>
  313. <a href='<?php the_permalink() ?>'>
  314. <div class='circle-button-text'><span>Read</span></div>
  315. <div class='circle-nav-smallbg'></div>
  316. <div class='circle-nav-bg'></div>
  317. <div class='circle-nav-darkbg'></div>
  318. </a>
  319. <?php the_post_thumbnail('blog_post_image'); ?>
  320. </div>
  321. </div>
  322. </div>
  323.  
  324. <div class='two_fifth' style="margin-bottom: 0;">
  325. <h3><span style='color: #fff; font-weight: bold; margin-bottom: 10px; float: left; padding-bottom: 10px; border-bottom: dotted 1px #d7d7d7;'><a href='<?php the_permalink() ?>'><?php the_title(); ?></a></span></h3>
  326. <div class='post-full'>
  327. <span style='margin-bottom: 10px; float: left; color: #fff;'><i class='icon-calendar'></i><a href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>"><?php the_time('M j, Y') ?></a></span>
  328. <?php custom_excerpt(30); ?>
  329. <div class='post-preview-excerpt-more'><a href='<?php the_permalink() ?>'>Read More</a></div>
  330. </div>
  331. </div>
  332.  
  333. </li>
  334.  
  335. <?php endwhile; ?>
  336.  
  337. <?php wp_reset_query(); ?>
  338.  
  339. </ul>
  340. </div>
  341.  
  342. </div>
  343. <!-- end header -->
  344. </div>
  345. <!-- End Slideshow Container -->
  346.  
  347.  
  348. <?php endif; ?>
  349.  
  350.  
  351.  
  352. <?php
  353.  
  354. $page_tagline = get_post_meta($current_page_id, 'page_tagline', true);
  355.  
  356. if(!empty($page_tagline))
  357. {
  358. ?>
  359.  
  360. <!-- Page Tagline Container -->
  361. <div class="container_wrap" id="page-tagline">
  362.  
  363. <div class="container">
  364.  
  365. <div class="full">
  366. <div class="slogan">
  367. <?php echo $page_tagline; ?>
  368. </div>
  369. </div>
  370.  
  371. </div>
  372.  
  373. </div>
  374. <!-- End Page Tagline Container -->
  375.  
  376. <?php
  377. }
  378. ?>
  379.  
  380.  
  381.  
  382.  
  383. <!-- Container -->
  384. <div id="container">
  385.  
  386. <!-- Begin Main Container -->
  387. <div class="container_wrap" id="main">
  388.  
  389. <!-- Begin Services -->
  390. <div class="container">
  391.  
  392.  
  393.  
  394. <div class="two_third first">
  395.  
  396. <?php
  397.  
  398. if(!empty($page_title))
  399. {
  400. ?>
  401.  
  402. <!-- Page Title Container -->
  403. <div id="page-title">
  404. <div class="page-title full">
  405. <h2><?php echo $page_title; ?></h2>
  406. </div>
  407. </div>
  408. <!-- End Page Title Container -->
  409.  
  410. <?php
  411. }
  412. ?>
  413.  
  414. <?php
  415.  
  416. global $paged, $wp_query, $wp;
  417.  
  418. $args = wp_parse_args($wp->matched_query);
  419.  
  420. if ( !empty ( $args['paged'] ) && 0 == $paged ) {
  421.  
  422. $wp_query->set('paged', $args['paged']);
  423.  
  424. $paged = $args['paged'];
  425.  
  426. }
  427.  
  428. $temp = $wp_query;
  429.  
  430. $wp_query= null;
  431.  
  432. $wp_query = new WP_Query();
  433.  
  434. $wp_query->query('post_type=post&paged='.$paged);
  435.  
  436.  
  437.  
  438. ?>
  439.  
  440. <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
  441.  
  442. <div class="post-preview" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  443.  
  444. <?php if ( has_post_thumbnail() ) { ?>
  445.  
  446. <div class="post-image">
  447. <div class="full">
  448. <div class="circle-nav">
  449. <div class="cn-nav">
  450. <a href="<?php the_permalink() ?>">
  451. <div class="circle-button-text"><span>Read</span></div>
  452. <div class="circle-nav-smallbg"></div>
  453. <div class="circle-nav-bg"></div>
  454. <div class="circle-nav-darkbg"></div>
  455. </a>
  456. <?php the_post_thumbnail('blog_post_image'); ?>
  457. </div>
  458. </div>
  459. </div>
  460. </div>
  461.  
  462. <div class="post-title">
  463.  
  464. <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  465.  
  466. <div class="post-full">
  467.  
  468. <?php custom_excerpt(30); ?>
  469.  
  470. <p><i class="icon-calendar"></i><a href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>"><?php the_time('M j, Y') ?></a> <span class="post-meta-devider">//</span> <i class="icon-user"></i><?php the_author_posts_link(); ?> <span class="post-meta-devider">//</span> <i class="icon-tag"></i><?php the_category(', '); ?> <span class="post-meta-devider">//</span> <i class="icon-comment"></i> <a href="<?php xenforo_thread_url(); ?>"><?php global $post_id; echo get_comments_number( $post_id ); ?></a></a></p>
  471.  
  472. </div>
  473.  
  474. </div>
  475.  
  476. <?php
  477. } else {
  478. ?>
  479.  
  480. <div class="post-image"><div class="post-category"><?php the_category(', '); ?></div>
  481. <div class="full">
  482. <div class="circle-nav">
  483. <div class="cn-nav">
  484. <a href="<?php the_permalink() ?>">
  485. <div class="circle-button-text"><span>Read</span></div>
  486. <div class="circle-nav-smallbg"></div>
  487. <div class="circle-nav-bg"></div>
  488. <div class="circle-nav-darkbg"></div>
  489. </a>
  490. <a href="<?php the_permalink() ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/no-img.png" alt="No image"/></a>
  491. </div>
  492. </div>
  493. </div>
  494. </div>
  495.  
  496. <div class="post-title">
  497.  
  498. <h4><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h4>
  499.  
  500. <div class="post-full">
  501.  
  502. <?php custom_excerpt(30); ?>
  503.  
  504. <p><i class="icon-calendar"></i><a href="<?php echo get_month_link(get_the_time('Y'), get_the_time('m')); ?>"><?php the_time('M j, Y') ?></a> <span class="post-meta-devider">//</span> <i class="icon-user"></i><?php the_author_posts_link(); ?> <span class="post-meta-devider">//</span> <i class="icon-comment"></i> <a href="<?php comments_link(); ?>"><?php global $post_id; echo get_comments_number( $post_id ); ?></a> <span class="post-meta-devider">//</span> <i class="icon-eye-open"></i><a href="<?php the_permalink() ?>"><?php echo getPostViews(get_the_ID()); ?></a></p>
  505.  
  506. </div>
  507.  
  508. </div>
  509.  
  510. <?php
  511. }
  512. ?>
  513.  
  514. </div>
  515.  
  516. <?php endwhile; ?>
  517.  
  518. <!-- Begin Pagination-->
  519. <?php get_template_part('pagination'); ?>
  520. <!-- End Pagination-->
  521.  
  522. <?php $wp_query = null; $wp_query = $temp;?>
  523.  
  524. </div>
  525.  
  526. <div class="one_third sidebar_spot">
  527. <?php get_sidebar('blog'); ?>
  528. </div>
  529.  
  530. </div>
  531. <!-- End Content -->
  532.  
  533. </div>
  534. <!-- End Main Container -->
  535.  
  536. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement