Changing document title only on a custom page template

I think you will want to use the wp_title filter. Add the following to functions.php: function wpse62415_filter_wp_title( $title ) { // Return a custom document title for // the boat details custom page template if ( is_page_template( ‘boatDetails.php’ ) ) { return ‘I\’m the boat details page’; } // Otherwise, don’t modify the document title … Read more

How to show a post single post in page template

The »Template Hierarchy« doesn’t allow this per default. Inside your single.php template, you can call load_template(). This will allow you to simply include the template you need, based on the in_category() conditional tag. // inside single.php if ( in_category( ‘foo’ ) ) { load_template( get_stylesheet_directory().’foo_template.php’ ); } elseif ( in_category( ‘bar’ ) ) { load_template( … Read more

How to create custom home page via plugin?

An Active Plugin To make an active plugin, use the following resources: WordPress Codex: Writing a Plugin WordPress Essentials: How To Create A WordPress Plugin by Daniel Pataki From the following StackExchange thread, try to understand what are the Hooks and what are things acting behind a plugin: How to edit a wordpress plugin without … Read more

Remove navigation from header in custom page template

Use a conditional tag: Codex References: Function Reference (is_page) Function Reference (Conditional Tags) You can specify the landing page by Page ID, Page Title or Page Slug. Here is an example: <?php if ( !is_page( ‘landing-page’ ) ) { wp_nav_menu( array( ‘show_home’ => ‘Home’, ‘container’ => ‘false’, ‘theme_location’ => ‘main’) ); } endif; ?> It … Read more

Making images from single.php pointing to an attachment .php template

If I understand you correctly, you need to link your images not to the file, but to the attachment template (attachment.php). If so, then try the following code in your single.php: <?php if( has_post_thumbnail() ) { $attachment_page_url=””; $attachment_page_url = get_attachment_link( get_post_thumbnail_id() ); ?> <a href=”<?php echo $attachment_page_url; ?>” class=”featured-image”> <?php the_post_thumbnail(); ?> </a> <?php } … Read more