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
/** | |
* Process meta | |
* | |
* Processes the custom tab options when a post is saved | |
*/ | |
function process_product_meta_custom_tab($post_id) { | |
update_post_meta($post_id, 'custom_tab_enabled', (isset ($_POST['custom_tab_enabled']) && $_POST['custom_tab_enabled']) ? 'yes' : 'no'); | |
update_post_meta($post_id, 'custom_tab_title', $_POST['custom_tab_title']); | |
update_post_meta($post_id, 'custom_tab_content', $_POST['custom_tab_content']); | |
} |
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
<?php | |
global $wp_query; | |
if( empty($wp_query->post->post_parent) ) { | |
$parent = $wp_query->post->ID; | |
} else { | |
$parent = array_reverse(get_post_ancestors($post->ID)); | |
$parent = $parent[0]; | |
} | |
if(wp_list_pages("title_li=&child_of=$parent&echo=0" )) { | |
?> |
NewerOlder