Create a frontpage.php and static page template

When you make a page the page for posts, it is no longer a page in the conventional sense, so it won’t load your custom page template. See the Template Hierarchy to learn how WordPress selects a template based on the requested page. This behavior also extends to Conditional Tags. is_page() will return false on … Read more

Index page is not working

I expect that there is an index.html or an index.htm file in that directory which is getting priority over WordPress’s index.php. Remove or rename that .htm? file. For reference: http://httpd.apache.org/docs/2.2/mod/mod_dir.html See the DirectoryIndex part.

Use an archive as the parent of a page?

Once wordpress reads the “Events” part of the URL it knows that what follows are posts or subcategories of the events category, and a page is neither, and that is the reason you don’t even have an option of doing what you want. Do it as a post instead of a page. Then edit you … Read more

Outputting content from page

wp_get_attachment_image_src returns an array, not a single value. Please refer to this article for more info: wordpress.org/Function_Reference/wp_get_attachment_image_src Default Usage <?php $attachment_id = 8; // attachment ID $image_attributes = wp_get_attachment_image_src( $attachment_id ); // returns an array ?> <img src=”https://wordpress.stackexchange.com/questions/87552/<?php echo $image_attributes[0]; ?>” width=”<?php echo $image_attributes[1]; ?>” height=”<?php echo $image_attributes[2]; ?>”>

Print page content with formatting when doing custom SQL query

You need to run the post_content filters. It is a one line change from your current code. This… echo $footerElement->post_content; … should be … echo apply_filters(‘the_content’,$footerElement->post_content); That will give you all the same formatting as with normal posts. You can of course pick and choose which filters you want to run, instead of running them … Read more

Page Title repeating

look into header.php of your theme; <title><?php bloginfo(‘name’); ?><?php wp_title(); ?></title> when you use a seo plugin, you can control the meta title with the plugin; change that line to: <title><?php wp_title(); ?></title>

How to bypass 404 for certain pages/posts?

When you add a custom post type, WordPress doesn’t know that it needs to regenerate it’s permalinks/rewrite rules. Visit the permalinks settings page to flush and regenerate the links and your custom post type permalinks will start to work, else you’ll get 404 messages. A word of warning: Some people will advise you call flush_rewrite_rules … Read more