Guest User

Untitled

a guest
Jan 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. <?php
  2. global $options;
  3. foreach ($options as $value) {
  4. if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  5. }
  6. ?>
  7. <?php get_header(); ?>
  8. <? if ($xs_disable_slider== "true") { ?>
  9. <? } else { ?>
  10. <?php get_template_part( 'slider' ) ?>
  11. <? } ?>
  12. <div id="main">
  13. <?php if (have_posts()) : ?>
  14. <?php while (have_posts()) : the_post();
  15. $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
  16. ?>
  17. <div class="post">
  18. <h2 class="posttitlehome"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  19. <div class="postcontent">
  20. <?
  21. // Checks To See If, Thumbnails Are Disabled
  22. if ($xs_disable_thumbnails_homepage == "true") { ?>
  23. <?
  24. //If Not Disabled, Show Thumbnails
  25. } else { ?>
  26. <div class="postimg">
  27. <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><img src="<?php
  28. if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) {
  29. if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) {
  30. echo $thumbnail[0];
  31. $if=1;
  32. } else {
  33. $postimage = get_post_meta($post->ID, 'post-image', true);
  34. if ($postimage) {
  35. $if=2;
  36. echo $postimage;
  37. } else {
  38. echo catch_that_image();
  39. $if=3;
  40. }
  41. } echo $thumbnail[2];
  42. } else {
  43. $postimage = get_post_meta($post->ID, 'post-image', true);
  44. if ($postimage) {
  45. echo $postimage;
  46. } else {
  47. echo catch_that_image();
  48. }
  49. }
  50. ?>" alt="<?php the_title(); ?>" /></a>
  51. </div><!-- /postimg -->
  52. <? } echo "<!-- ".$if." -->"; ?>
  53. <?php the_excerpt(''); ?>
  54. </div><!-- /postcontent -->
  55. <div class="clear"></div>
  56. <a class="read-more" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">Читать далее</a>
  57. </div><!-- /post -->
  58. <?php endwhile; ?>
  59. <?php
  60. //Check For the Page Navi Plugin
  61. if (function_exists('wp_pagenavi')) {
  62. wp_pagenavi();
  63. //Show Default Navigation if Page Navi Is Not Installed
  64. } else { ?>
  65. <div class="paginate">
  66. <div class="paginate-left"><?php previous_posts_link('Новые записи') ?></div>
  67. <div class="paginate-right"><?php next_posts_link('Предыдущие записи') ?></div>
  68. </div><!-- /paginate -->
  69. <? } ?>
  70. <?php else : ?>
  71. <h1>По вашему запросу ничего не найдено</h1>
  72.  
  73. <?php endif; ?>
  74. </div><!-- /main -->
  75. <?php get_sidebar(); ?>
  76. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment