Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
[WordPress] An example of cleanly organizing the front end of a custom meta box tabbed interface.
<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>
<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
You can’t perform that action at this time.