Skip to content

Instantly share code, notes, and snippets.

@media317
Created February 5, 2015 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save media317/49ce3f4ccacf7d004e5c to your computer and use it in GitHub Desktop.
Save media317/49ce3f4ccacf7d004e5c to your computer and use it in GitHub Desktop.
Using Genesis Easter Egg (query_arg in custom field) [http://wphighed.org/2013/09/quick-tip-genesis-easter-egg/]
<?php
/**
* The template used for displaying page content in page.php
*
* @package AppPresser Theme
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry-content">
<?php the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'apptheme' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php $my_post_meta = get_post_meta($post->ID, 'cbc_category', true); ?>
<?php if ( ! empty ( $my_post_meta )) { ?>
<div class="cbc-cat">
<h2>Recent Activity</h2>
<?php
query_posts( get_post_meta( get_the_ID(), 'cbc_category', true ) ); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( 'home-bottom' ); ?></a>
<h4><?php the_title(); ?></h4>
<?php endwhile; endif;
wp_reset_query(); ?>
</div>
<?php } ?>
<?php edit_post_link( __( 'Edit', 'apptheme' ), '<footer class="entry-meta"><span class="edit-link">', '</span></footer>' ); ?>
</article><!-- #post-## -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment