Widget & storing a Select box choice

Here’s the working answer for future reference. <p> <label for=”<?php echo $this->get_field_id(‘select’); ?>”><?php _e(‘Choose A Page:’, ‘check_avail_widget’); ?></label> <select name=”<?php echo $this->get_field_name(‘select’); ?>” id=”<?php echo $this->get_field_id(‘select’); ?>” class=”widefat”> <option value=”Select A Page”> <?php echo esc_attr( __(‘Select A Page’) ); ?> </option> <?php $pages = get_pages(); foreach ($pages as $page) { echo ‘<option value=”‘.get_page_link($page->ID).'” id=”‘ . … Read more

How to migrate .HTML pages to WordPress

For posts there even is an easy way to change this in the backend: Settings → Permalinks Codex: Permalink Settings The problem is that for pages this isn’t a built in feature. Here is another question that might give you a hint: Add .html (dot HTML) extension to custom post types The reasons why I … Read more

Prevent page from displaying

Use the date_query parameter in a query1. Make sure you query posts that are both the age you require and currently public. Set the post status to private2 with the wp_insert_post()3 function. Here’s an example from the codex which should give you an idea for how to query for posts older than a certain date:1 … Read more

custom page or standalone page?

As Andrew stated, a custom page/template would be the most efficient way to display the calculator. You can leave this as a simple page, displaying just your calculator, or you can add in “the loop” below the calculator to display additional text which would be easily edited in WordPress.