Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created January 9, 2015 18:43
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 braddalton/89889823ab73ff19e032 to your computer and use it in GitHub Desktop.
Save braddalton/89889823ab73ff19e032 to your computer and use it in GitHub Desktop.
add_action( 'loop_start', function() {
global $post;
if ( $image = genesis_get_image( 'format=url&size=thumbnail' ) )
printf( '<div class="alignleft"><a href="%s" rel="bookmark"><img src="%s" alt="%s" /></a></div>', get_permalink(), $image, the_title_attribute( 'echo=0' ) );
if (strtotime($post->post_date) > strtotime('-7 days') && !in_category('selgerarkivet') && is_singular('post')){
echo'<div class="one-half first">';
echo'<div class="your-class">Firmanavn:</div>';
echo'<div class="your-class">Kontaktperson:</div>';
echo'<div class="your-class">Telefon:</div>';
echo'<div class="your-class">Webside:</div>';
echo'</div>';
echo'<div class="one-half">';
genesis_get_custom_field('firmanavn');
genesis_get_custom_field('kontaktperson');
genesis_get_custom_field('telefon');
genesis_get_custom_field ('webside');
echo'</div>';
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment