Ordering Pages and Increasing Navigation
Probably the easiest thing to do would be to create a custom menu. That would give you control over the order that the pages appear in.
Probably the easiest thing to do would be to create a custom menu. That would give you control over the order that the pages appear in.
This should work by putting the good IDs. The paged attribute is useless here as you’ll always show the same posts. <div id=”main_posts”> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query(array( ‘showposts’ => 3, //’paged’ => $paged, ‘post_type’ => ‘page’, ‘post__in’ => array(1, 2, 3) // Your post IDs )); ?> <?php … Read more
$query = new WP_Query( ‘post_type=page’ ); as seen at codex http://codex.wordpress.org/Class_Reference/WP_Query#Type_.26_Status_Parameters
You can indeed query on post metadata, see Custom Field Parametersfor WP_Query in Codex. I would recommend against using a custom table. EDIT – Here’s an example query for all resorts with meta key vertical_feet between 2000 and 3000: $args = array( ‘post_type’ => ‘resort’, ‘posts_per_page’ => -1, ‘meta_query’ => array( array( ‘key’ => ‘vertical_feet’, … Read more
The short answer is that your pages are stored in a database. So they are likely to be safe. It sounds like something else is broken with your site … please can you cut n paste any error message here What were you doing to break it? 1. If you recently updated a plugin or … Read more
You should be using wp_enqueue_script rather than putting script tags directly in template files: function wpa61143_enqueue_scripts() { if( is_page( ‘home’ ) ) : wp_enqueue_script( ‘jcarousel’, get_template_directory_uri() . ‘/scripts/jquery.jcarousel.min.js’, array( ‘jquery’ ), null, true, ); elseif( is_single() ) : // enqueue scripts for single elseif( ! is_page_template(‘modelPages.php’) ) : // enqueue scripts for other endif; } … Read more
From my view, I avoid using the wp editor at all. It doesn’t offer all the good things a IDE can provide. If you have a local server running, you probably can access it. For example, in linux its usally on /var/www/localhost/htdocs/ but it varies a lot from distro to distro. You can also use … Read more
I can confirm that Password Protected pages still work as normal in 3.4.1. The password protect form does submit the password to /wp-login.php?action=postpass where that file deals with authentication. Upon successful or failed login the file will redirect you back to the page the user was on. One thing to be aware of is that … Read more
This function will do the trick, it displays the child pages of the current page, but if there are no child pages, it displays the child pages of the parent page, and a link back to the parent page. /** * @brief: Shows the subpages of the current page, or * the adjacent sibling pages. … Read more
functions attached to manage_pages_custom_column get fired for every custom column, you have to check the name of the column within the function to only output data for that specific column: add_action( ‘manage_pages_custom_column’, ‘AddColumnValue’, 10, 2 ); function AddColumnValue( $column_name, $post_id ) { if( ‘thumbnail’ == $column_name ): echo ‘Header Image data here’; elseif( ‘cssColor’ == … Read more