Single post as homepage?

Not sure if it is the most elegant way but the easiest is probably to create a shortcode that displays a single page, and then set that page to display as the front page. e.g. http://wordpress.org/extend/plugins/post-content-shortcodes/

How do I create a separate page for each author?

Create an author.php template by copying your themes archive template to start with. Then you can modify it as you wish. WordPress will use this author template for every author on your site automatically As an example visit damien.co/author/damiensaunders Note you may have to change your authors names as Damien (space) Saunders doesn’t become damien%20saunders … Read more

Custom page template not working

I think you’re muddling up the Template Hierarchy, so make sure to start by reading that. page-blog-page.php is for a page with the slug “blog-page.” If you’re using a page template, then you should name it something outside of the template hierarchy-reserved name spaces (e.g. page-{slug}, etc.) such as template-swapnesh.php. Also, WordPress has the blog … Read more

Add a Second Menu to a theme that only support 1 menu

Adding custom menu position to your wordpress theme is fairly simple. This is usually done this way: 1. Announcing the desired menu positions (in function.php): add_action( ‘init’, ‘register_my_menus’ ); function register_my_menus() { register_nav_menus( array( ‘first-menu’ => __( ‘First Menu’ ), ‘second-menu’ => __( ‘Second Menu’ ), ‘third-menu’ => __( ‘Third Menu’ ) ) ); } … Read more

Custom Post Type Taxonomies -Posts not showing in Category or Tag pages

You were close with the code you posted in your comment. The issue is that you only tested for is_main_query, which will limit every query on your site to that single post type. function wpa82763_custom_type_in_categories( $query ) { if ( $query->is_main_query() && ( $query->is_category() || $query->is_tag() ) ) { $query->set( ‘post_type’, array( ‘post’, ‘resource’ ) … Read more

Custom Post Templates

I think this approach will work. 1.create template for single post like singlepost.php( default single post template),singlepost-99.php,singlepost-101.php. 2.now put just this code in single.php <?php global $post; get_template_part(‘singlepost’,$post->ID); ?> what this code does check for single post template for current post by post id if not found call singlepost.php. Important Link: get_template_part()

Theme development question regarding layouts

Your consistent/common areas are: Header (Including nav) Footer Sidebar So you can easily make them accordingly to: header.php – get_header(); footer.php – get_footer(); sidebar.php – get_sidebar(); And the right content area, as it is inconsistent, so it can be separated into a different page as: content.php (general template) content-double.php (template 1) content-page.php (template 2) etc. … Read more

post edit button on front end

The function is edit_post_link() (see Codex or source). In TwentyEleven it used as follows in content.php edit_post_link( __( ‘Edit’, ‘twentyeleven’ ), ‘<span class=”edit-link”>’, ‘</span>’ ); You can simply use the function as indicated above (or in the Codex) in a custom template, but it must be used inside the loop. There’s no need to perform … Read more

Loop through pages with specific template

WordPress saves page templates that is assigned to a specific page in the db in the wp_postmeta table. These are saved as follows: ‘meta_key’ => ‘_wp_page_template’, ‘meta_value’ => ‘NAME_ OF_TEMPLATE’ With this in mind, you can loop through pages which shares a specific page template, using get_pages (You can also make use of WP_Query) Example: … Read more