Advertisement
Guest User

index.php

a guest
Aug 17th, 2012
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.74 KB | None | 0 0
  1. <?php
  2. /**
  3. * The main template file.
  4. *
  5. * This is the most generic template file in a WordPress theme
  6. * and one of the two required files for a theme (the other being style.css).
  7. * It is used to display a page when nothing more specific matches a query.
  8. * E.g., it puts together the home page when no home.php file exists.
  9. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  10. *
  11. * @package WordPress
  12. * @subpackage Twenty_Eleven
  13. */
  14.  
  15. get_header(); ?>
  16.  
  17. <script type="text/javascript">
  18. function trimfunction(string)
  19. {
  20. var length = 6;
  21. var trimmedString = string.substring(0, length);
  22. return trimmedString;
  23. }
  24. </script>
  25.  
  26.  
  27. <div id="slider" class="clearfix">
  28. <div id="sliderimage">
  29. <img src="http://localhost/wordpress/wp-content/uploads/2012/08/newimage.png" width="900px" height="210"/></div>
  30. </div>
  31. </div>
  32. <div id="content" class="clearfix" >
  33. <div id="contenttext">
  34. <div id="leftcontent">
  35. <?php
  36. $paged = get_query_var( 'paged' );
  37.  
  38. $args = array(
  39. 'posts_per_page' => 3,
  40. 'paged' => $paged
  41.  
  42. );
  43.  
  44. $loop = new WP_Query($args);
  45.  
  46. while ($loop->have_posts()) : $loop->the_post(); ?>
  47.  
  48.  
  49. <div class="gallery">
  50. <div class="gallery_img">
  51. <?php the_post_thumbnail('title-image', array('class' => 'titleImage', 'alt' => 'Title Icon'));
  52. echo(function_exists( 'add_theme_support' ));?>
  53.  
  54. <div style="float:left;width:300px;">
  55. <article class="item">
  56.  
  57. <div class="socialbuttons">
  58. <div style="width:75px;"> <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a></div>
  59. </div>
  60. </article>
  61. </div>
  62. </div>
  63.  
  64. <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
  65. <div class="gallery_content">
  66. <a style="text-decoration:none" href="<?php the_permalink();?>"><H1><?php the_title() ?></H1></a>
  67. <div class="gallery_content1"> <?php the_excerpt_dynamic('100'); ?></div>
  68. </div>
  69.  
  70.  
  71. </div>
  72.  
  73. <?php endwhile; ?><!--end custom loop-->
  74.  
  75. <div class="pagination">
  76. <?php wp_paging(); ?>
  77. </div><!--end pagination-->
  78.  
  79.  
  80.  
  81. </div>
  82. </div>
  83. <div id="rightcontent">
  84. <?php get_sidebar(); ?>
  85. <a href="http://www.facebook.com/TheDailyCrowdsource"><img alt="facebook" src="<?php bloginfo('template_url'); ?>/images/facebook-icon_s.png" /></a>
  86. <a href="https://twitter.com/TDCrowdsource"><img alt="facebook" src="<?php bloginfo('template_url'); ?>/images/twitter-icon_s.png" /></a>
  87.  
  88. </div>
  89. </div></div>
  90.  
  91. <div id="footer">
  92. <div id="footertext">
  93. <p align="center">Copyright © Daily Crowdsource - Crowdsource Better</br>
  94. <a href="http://dailycrowdsource.com/crowdsourcing-basics/what-is-crowdsourcing" style="text-decoration: none;color: white">What is Crowdsourcing?</a></p></div> </div>
  95.  
  96. </div>
  97. </div>
  98. </div>
  99. <script type="text/javascript">
  100.  
  101. var _gaq = _gaq || [];
  102. _gaq.push(['_setAccount', 'UA-17624557-1']);
  103. _gaq.push(['_setDomainName', 'dailycrowdsource.com']);
  104. _gaq.push(['_trackPageview']);
  105.  
  106. (function() {
  107. var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  108. ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  109. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  110. })();
  111.  
  112. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement