add new metabox to page editor with just page parent

Did just that for one of my plugins, recently… function render($post) { $pages = wp_dropdown_pages(array(‘post_type’ => ‘page’, ‘exclude_tree’ => $post->ID, ‘selected’ => $post->post_parent, ‘name’ => ‘parent_id’, ‘show_option_none’ => __(‘(no parent)’), ‘sort_column’=> ‘menu_order, post_title’, ‘echo’ => 0)); if (!empty($pages)) { ?> <p><strong><?php _e(‘Parent’) ?></strong></p> <label class=”screen-reader-text” for=”parent_id”><?php _e(‘Landing Page’) ?></label> <?php echo $pages; ?> <?php } … Read more

post-page: reference to parent page?

You can do that: //add reff to query vars to hold the referring page ID add_filter(‘query_vars’, ‘my_query_vars’); function my_query_vars($vars) { // add movies_view to the valid list of variables $new_vars = array(‘reff’); $vars = $new_vars + $vars; return $vars; } then add ?reff=<?php echo $post->ID; ?> to your “post’s detail” link and on your “post-detail.php” … Read more

Relative instead of absolute links in pages?

There is a filter, post_link, that permalinks pass through before being returned from get_permalink in wp-includes/link-template.php. You can use that filter to alter the links. However, beware that making all permalinks relative may have unintended consequences in certain contexts, e.g. you might not want relative links when is_feed() == true. You may find that the … Read more

Job Manager plugin help?

the plugin creates a page on activation named “Job Listing” so go to settings >> reading >> Front page displays: pick “A static page (select below)” and for “Front page: ” select “Job Listing”.

Should I use custom taxonomy or custom post type

So, at the end of the day, your content is about resorts (that is, “destination” = resort? If so: Custom Post Type: destination (semantically, it would be “resort”, but you can use “destination” to meet your client’s needs) Custom Taxonomy(ies): location (country, city, etc.) EDIT: How to parse the terminology: Post: noun Taxonomies: adjectives The … Read more