Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: deano89 on May 30th, 2011  |  syntax: None  |  size: 1.48 KB  |  hits: 250  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. This is what i have at the minute. But I would like the div tags in the page.php but when i do that all i get is plain text.
  2.  
  3. page.php
  4.  
  5. <?php if (is_page ('Home', 'About', 'Services', 'Pricelist', 'Contact')) ?>
  6. <?php get_template_part( 'loop-page'); ?>
  7.  
  8.  
  9. <?php if (is_page ('News')) ?>
  10. <?php get_template_part( 'loop-news');?>
  11.  
  12.  
  13. <?php if (is_page ('Portfolio')) ?>
  14. <?php get_template_part( 'loop-portfolio');?>
  15.  
  16.  
  17.  
  18. loop-page.php
  19.  
  20. <?php
  21. /*Template Name: loop-page.php
  22.  */
  23. ?>
  24.  
  25. <?php get_header(); ?>
  26.  
  27.  
  28. <div id class="content_container"> <?php get_sidebar (); ?>
  29.  
  30. <div id class="main_content">
  31. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  32. <h1><?php the_title(); ?></h1>
  33.  
  34. <p><?php the_content(); ?></p>
  35.  
  36. </div>
  37. </div>
  38. <?php endwhile; // end of the loop. ?>
  39.  
  40. <?php get_footer(); ?>
  41.  
  42.  
  43.  
  44.  
  45. loop-portfolio.php
  46.  
  47.  
  48. <?php
  49. /*Template Name: loop-portfolio.php
  50.  */
  51. ?>
  52.  
  53. <?php get_header();?>
  54.  
  55. <?php query_posts('category_name=portfolio&posts_per_page=3');?>
  56.  
  57. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  58. <div id class="content_container"> <?php get_sidebar ();?>
  59.  
  60. <div id class="main_content">
  61.  
  62.   <div class="post_title"><h1><?php the_title();?></h1></div>
  63.   <div id class="clear"></div>
  64.   <div id class="picbox"></div>
  65.  
  66. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  67.  
  68. <p><?php the_content();?></p>
  69.     </div>
  70.   </div>
  71.  
  72.  
  73. </div>
  74. </div>
  75. <?php endwhile; // end of the loop. ?>
  76.  
  77. <?php get_footer();?>