How to restore file or theme?

download the twentytwelve theme here http://wordpress.org/extend/themes/twentytwelve unpack the files and take the page.php file and upload it to the wp-content/themes/twentytwelve folder overwriting the one that is there

Excerpt Now Showing on the Post Page

I am guessing a bit but based on your description, you probably only have an index.php file running both of those pages. If you create a single.php file in the theme that (probably) matches what you had in the index.php before you edited it, you should have what you want. WordPress will look in the … Read more

Multiple Loops Breaking Pages

Your page is behaving weirdly because you are using query_posts which clobbers the main query. Anything else on the page that depends on the main query has the wrong information after your query_posts runs. Don’t use query_posts. $qry = new WP_Query(‘category_name=News and Events, Uncategorized&showposts=5’); if ($qry->have_posts()) { while ($qry->have_posts()) { $qry->the_post(); // your Loop as … Read more

How to create a page and display only the posts with a specific custom field value?

Duplicate your page.php template, name the duplicate page-facebook.php, give it a template name: /* Template Name: My Facebook Meta Key Page */ More information here: http://codex.wordpress.org/Page_Templates To get the right posts with get_posts use something like this: <?php $args = array( ‘post_type’ => ‘post’, ‘meta_query’ => array( array( ‘key’ => ‘facebook’, ‘value’ => ‘yes’, ) … Read more

Exclude page name from loop

An alternative way is putting the unwanted pages in an array. Useful for storing them in a option or in a serialized custom field. $exclude_pages = array(‘music’, ‘contact’); // can be something like this: $exclude_pages = get_option(‘exclude_pages’); if ( have_posts() ) : while ( have_posts() ) : the_post(); if ( is_page() && ! empty($exclude_pages) && … Read more

How to use is_admin in page content?

As @Rarst said, use PHP code inside a post content is bad habit. But you can use another workaround to show a section only for appropriate users. Add the following code into your functions.php file: add_shortcode( ‘if_user_can’, ‘wpse8170_show_content_if_user_can’ ); function wpse8170_show_content_if_user_can( $atts, $content=”” ) { $atts = shortcode_atts( array( ‘capability’ => ‘edit_posts’ ), $atts ); … Read more