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

Getting child content

I would like to suggest you to use WP_Query to fetch pages from db: $the_query = new WP_Query( array( ‘post_parent’ => $page->ID, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘posts_per_page’ => 3, ) ); while ( $the_query->have_posts() ) : $the_query->the_post(); ?> <div class=”span4″> <h2><a href=”https://wordpress.stackexchange.com/questions/83491/<?php the_permalink() ?>”><?php the_title() ?></a></h2> <?php the_content() ?> </div> <?php endwhile; wp_reset_postdata(); … Read more

Too Many Pages in WordPress? 2013

Many pages were a problem when your permalink structure was a plain /%postname%/, because that is the same structure the post type page is using. Very complex additional rewrite rules were stored in the database to avoid collisions. This is not a problem anymore. If your permalink structure is the same for posts and pages, … Read more

Remove number in URL

When you delete a post, it merely gets put into the “trash” and retains its slug. When you created the “new” contact page, the slug “contact” was already in use by the original contact post that is in the trash. Go into your posts on the dashboard and click on the “Trash” link near the … Read more

Cannot get grandparent object

just a small error. To get the parent and Grandparent objects, you need to get_post them also. The property “post_parent” only gives you the ID of that post, not the post_object itself. So you change your code like this: <?php $current = get_post($post->ID); //Conditional to be sure there is a parent if($current->post_parent){ $grandparent = get_post($current->post_parent); … Read more

Want Page Title to show on menu, but not on page

A possible quick fix is to duplicate your page.php or index.php template file, rename it front-page.php, then open it and delete the_title(); and any html tags around it, like <h1> </h1> or whatever the title is wrapped in.

How to add meta boxes to Pages

I’ve got this working finally ($template_file == ‘page-tjenester.php’), so now my meta boxes shows up only when I use this specific page-template! This is the final code if someone is interesting; add_action(‘admin_init’,’my_meta_init’); function my_meta_init() { $post_id = $_GET[‘post’] ? $_GET[‘post’] : $_POST[‘post_ID’] ; $template_file = get_post_meta($post_id,’_wp_page_template’,TRUE); if ($template_file == ‘page-tjenester.php’) { // this will only … Read more

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