Skip to content

Instantly share code, notes, and snippets.

@blickwert
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save blickwert/ad01af4c2e664d2bd121 to your computer and use it in GitHub Desktop.

Select an option

Save blickwert/ad01af4c2e664d2bd121 to your computer and use it in GitHub Desktop.

Revisions

  1. thesigngroup renamed this gist Mar 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. thesigngroup renamed this gist Mar 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. thesigngroup revised this gist Mar 24, 2015. No changes.
  4. thesigngroup revised this gist Mar 24, 2015. No changes.
  5. thesigngroup renamed this gist Mar 24, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  6. thesigngroup created this gist Mar 24, 2015.
    32 changes: 32 additions & 0 deletions gistfile1.phtml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <?php /**
    * Genesis Before Content
    *
    * @author David Wögerer
    * @since 2.1.2
    *
    */

    add_action( 'genesis_before_content', 'widget_before_content' );
    function widget_before_content() {
    if ( is_front_page() ) { ?>
    <aside class="column-3">
    <?php $repeater_rows = get_field('repeater_pagelink');
    $num = 0;
    foreach ($repeater_rows as $repeater_row) {
    $num++;
    // var_dump($repeater_row);
    $params = array( 'width' => 250, 'height' => 250, 'crop' => true );
    $imageurl = wp_get_attachment_url ( $repeater_row['image_pagelink'] );
    $imageurl = bfi_thumb( $imageurl, $params ); ?>
    <a class="col<?php echo $num; ?>" style="background-image:url(<?php echo $imageurl; ?>);" href="<?php echo get_permalink( $repeater_row['url_pagelink'] ); ?>">
    <div>
    <span class="text1"><?php echo $repeater_row['text']; ?></span>
    <span class="text2"><?php echo $repeater_row['text2']; ?></span>
    </div>
    </a>
    <?php } ?>
    </aside>
    <?php }
    }

    ?>