Created
November 13, 2014 18:43
-
-
Save jeremyjaymes/59fbb68397a6353de9ad to your computer and use it in GitHub Desktop.
Anchor Link from Genesis Custom Post Class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Using Genesis custom post class to set up anchor links | |
## See http://jeremyjaymes.com/anchor-links-genesis-custom-post-class | |
# Step 1 Open first custom query | |
# i.e. $my-query->the_post(); | |
<div class="person"> | |
<a href="#' . genesis_get_custom_field( '_genesis_custom_post_class' ) . '">Headshot</a> | |
</div> | |
# Close loop 1 | |
# Step 2 Open second custom query | |
<div id="<?php echo genesis_get_custom_field( '_genesis_custom_post_class' ); ?>" class="person-info"> | |
Information, video | |
</div> | |
# Close loop 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment