Childpage title + content on Parent Page

You rarely ever need a custom SQL query, use the tools WordPress has to offer: $query = new WP_Query( array( ‘posts_per_page’ => -1, ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ‘orderby’ => ‘menu_order post_title’, ‘order’ => ‘ASC’, ) ); if ( $query->have_posts() ) : ?> <?php while ( $query->have_posts() ) : $query->the_post() ?> <div id=”page-<?php the_ID() … Read more

Display inner pages like posts.[Like how post excerpt works]

By default, the page post type does not show the excerpt box like posts, but you can enable it like this(code goes into your theme’s functions.php file): add_action(‘init’, ‘excerpt_for_pages’); function excerpt_for_pages() { add_post_type_support( ‘page’, ‘excerpt’ ); } Then you can see the excerpt field when you edit your page. If not, make sure it is … Read more

Adding custom slugs: parent-page/username/child-page/

Found the solution! I was trying to over complicate things. The best method I’ve come up with is: $users=get_page_by_title(‘users’); $about=get_page_by_title(‘about’); add_rewrite_rule(‘^users/([^/]*)$’,’index.php?page_id=’.$users->ID.’&username=$matches[1]’,’top’); add_rewrite_rule(‘^users/([^/]*)/about/?’,’index.php?page_id=’.$about->ID.’&username=$matches[1]’,’top’); Haven’t come up with errors yet, haven’t tested yet!

Page permalink ending in “-2”

I’m guessing that you have do have duplicates – duplicate permalinks, not necessarily duplicate titles per se. Have you trashed some posts with duplicate permalinks? Until you empty the WP trash, WP still considers their slugs in use. Also, what about Custom Post Types?

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