This website uses cookies to remember you and improve your experience. For more info see our Privacy Policy.

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

Mobile Menu

  • Menu
  • Skip to right header navigation
  • Skip to main content

Stormhill Media

Custom websites for every type of business

Header Right

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

Mullet

Home » Code Snippets » Mullet
// /* This code goes in index.php */

	<?php if ( have_posts() ) : ?>
	<?php /* Our Mullet Function begins here
 - Katie Suess 12/28/11 */
		$classnum = count(get_body_class());
 /* fetch body classes */
		$classarr = get_body_class();
 /* make it a testable variable */

		 for ($i = 0; $i <= $classnum; $i++) {
			 $bodyclass =  $classarr[$i];

			if ($bodyclass == paged) {
				$excerpt_trigger = 1;
/* No Mullet on Deeper Pages */
				break 1; /* exit the while */
			}
			else {
				$excerpt_trigger = 0;
 /* Set Count For Mullet */
			}
		 }
		 ?>
		<?php /* Start the Loop */ ?>
		<?php while ( have_posts() ) : the_post(); ?>
			<?php get_template_part( 'content',
get_post_format() ); /*This code pulls content.php */ ?>
			<?php $count++;
/* Increment Count for Mullet */ ?>
		<?php endwhile; ?>

/* This code goes in content.php */

		<?php if ( $GLOBALS['count'] == 0 ) :
/* Except for the first post, truncate it! */ ?>
		<div class="entry-content">
			<?php the_content( __( 'Continue reading
<span class="meta-nav">→</span>', 'twentyeleven' ) ); ?>
			<?php wp_link_pages( array( 'before' =>
'<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) .
'</span>', 'after' => '</div>' ) ); ?>
		</div><!-- .entry-content -->
		<?php else : ?>
		<div class="entry-summary">
			<?php the_excerpt(); ?>
		</div><!-- .entry-summary -->
		<?php endif; ?>
« Previous
Next »

Site Footer

Quick Links:

  • Contact Us
  • Pricing & Services
  • Sitemap
  • Terms/Conditions
  • Privacy Policy
  • Business Websites
  • Author Websites
  • SEO Services
(903) 213-5266‬

Copyright © 2025 · Stormhill Media All Rights Reserved.
Website by Stormhill Media
Log in