crfboston

single-agenda

Jun 17th, 2022
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.11 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The template for displaying any single post.
  4.  *
  5.  */
  6.  echo '<link rel="stylesheet" type="text/css" href="/wp-content/themes/divi-child/style.css">';
  7.  
  8. //get_header(); // This fxn gets the header.php file and renders it ?>
  9.     <div id="primary" class="row-fluid">
  10.         <div id="content" role="main" class="span8 offset2">
  11.  
  12.             <?php if ( have_posts() ) :
  13.             // Do we have any posts in the databse that match our query?
  14.             ?>
  15.  
  16.                 <?php while ( have_posts() ) : the_post();
  17.                 // If we have a post to show, start a loop that will display it
  18.                 ?>
  19.  
  20. <div class="container">
  21.     <div class="speakerdetail">
  22.         <div id="content-area" class="clearfix">
  23.  
  24.                     <article class="post">
  25.                    
  26.                         <h1 class="title"><?php the_title(); // Display the title of the post ?></h1>
  27.  
  28.                            
  29.  
  30.                             <?php $content = get_field('talks'); if ($content) : ?>
  31.  
  32.                             <!-- <h1 class="entry-title"><?php //echo $content[0]['title']; ?></h1> -->
  33.                             <div class="subtitle"><?php echo $content[0]['subtitle']; ?></div>
  34.                             <?php echo $content[0]['description']; ?>
  35.                             <!-- <pre><?PHP // print_r($content); ?></pre> -->
  36.                             <?php else: ?>
  37.                             <?php echo $subtitle; ?>
  38.  
  39.                             <?php endif; ?>
  40.            
  41.                        
  42.  
  43.  
  44.  
  45.                        
  46.                     </article>
  47.  
  48.                 <?php endwhile; // OK, let's stop the post loop once we've displayed it ?>
  49.                
  50.                 <?php
  51.                     // If comments are open or we have at least one comment, load up the default comment template provided by Wordpress
  52.                     if ( comments_open() || '0' != get_comments_number() )
  53.                         comments_template( '', true );
  54.                 ?>
  55.  
  56.  
  57.             <?php else : // Well, if there are no posts to display and loop through, let's apologize to the reader (also your 404 error) ?>
  58.                
  59.                 <article class="post error">
  60.                     <h1 class="404">Nothing has been posted like that yet</h1>
  61.                 </article>
  62.  
  63.             <?php endif; // OK, I think that takes care of both scenarios (having a post or not having a post to show) ?>
  64.  
  65.         </div><!-- #content .site-content -->
  66.         </div>
  67.     </div> 
  68.     </div>
  69.  
  70.  
  71.     </div><!-- #primary .content-area -->
  72. <?php //get_footer(); // This fxn gets the footer.php file and renders it ?>
  73.  
Advertisement
Add Comment
Please, Sign In to add comment