Show specific page on main index instead of latest

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

Having a series of pages created based on records in a table with fields populating the pages

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

How to recover pages from site with only ftp? [closed]

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

Loading scripts on specific pages using PHP in footer.php

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

WordPress Page Protect forwards to Admin Login

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

create 2 custom columns in page edit in Admin panel

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