-
-
Save tommcfarlin/310c253d37a688de58b9 to your computer and use it in GitHub Desktop.
[WordPress] An example of cleanly organizing the front end of a custom meta box tabbed interface.
This file contains 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
<div id="acme-navigation"> | |
<h2 class="nav-tab-wrapper current"> | |
<a class="nav-tab nav-tab-active" href="javascript:;">Extended Description</a> | |
<a class="nav-tab" href="javascript:;">Related Files</a> | |
<a class="nav-tab" href="javascript:;">Similar Posts</a> | |
</h2> | |
</div> | |
<?php include_once( 'partials/extended-description.php' ); ?> | |
<?php include_once( 'partials/related-files.php' ); ?> | |
<?php include_once( 'partials/similar-posts.php' ); ?> | |
<div id="custom-meta-box-nonce" class="hidden"> | |
<?php echo wp_create_nonce( 'acme-custom-meta-box-nonce' ); ?> | |
</span> |
This file contains 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
<div id="acme-extended-description" class="meta-options"> | |
<label for="acme-extended-description-field"> | |
Extended Description | |
</label> | |
<textarea name="acme-extended-description-field" id="acme-extended-description-field"> | |
<?php get_post_meta( $post->ID, 'acme_extended_description_field', true ); ?> | |
</textarea> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment