create template for one page

Edit your “page-contactWohnsinn.php” file, And add this code to top of the file, <?php /** * Template Name: Contact Wohnsinn * * @package WordPress */ ?> and go to you page that you created in wp-admin, choose the template “Contact Wohnsinn” from right side options… and you are done..

Custom page Template and Script as a Plugin

This is covered in the Codex, under How to create a page template. In your theme you create a file called my-bacon-template.php and in that file you add the following to the top of the file, before any other code <?php /* Template Name: My Bacon Page */ After that you can put any content … Read more

Special 404 header page

Further to my comment: I ran across a very similar issue with get_sidebar(), which I expected (incorrectly) to work the same as get_template_part(). A work-around is to do something like this: // instead of using get_header( ‘404’ ); , do this: get_template_part( ‘header’, ‘404’ ); // which should select ‘header-404.php’, or, if it doesn’t // … Read more

How to set title from page-template?

I am guessing that $dataAccess is instantiated as a global. If that is true, this code… $slug = $location = htmlspecialchars(urldecode(get_query_var(‘slug’))); $office = $dataAccess->getProfile($slug); … should also work in a wp_title callback. You’d just need global $dataAccess; to pull the variable into scope, though there are probably more elegant ways to do it.

Loading custom page template on a one page website

add_filter( ‘template_include’, ‘wpsites_home_page_template’, 99 ); function wpsites_home_page_template( $template ) { if ( is_singular( ‘page’ ) ) { $new_template = locate_template( array( ‘single_page-template.php’ ) ); if ( ” != $new_template ) { return $new_template ; } } return $template; } You should be able to tweak something like this to get it to do what you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)