how to list subpages in sidebar without widget

Simplest solution would be: <li><ul> <?php wp_list_pages(‘title_li=&child_of=”.$post->ID.”‘); ?> </ul></li> Use this code for more flexibility: <?php if ( is_page() ) { ?> <?php if($post->post_parent) $children = wp_list_pages(‘title_li=&child_of=”.$post->post_parent.”&echo=0’); else $children = wp_list_pages(‘title_li=&child_of=”.$post->ID.”&echo=0’); if ($children) { ?> <li> <h2> <?php $parent_title = get_the_title($post->post_parent); echo $parent_title; ?> </h2> <ul> <?php echo $children; ?> </ul> </li> <?php } } … Read more

How to align bold,italic and underline in wp-admin?

If it is editor mode specific, then make a CSS file named: editor-style.css and then add the following code into functions.php within PHP tags: // CUSTOM EDITOR STYLES // This theme styles the visual editor with editor-style.css to match the theme style. add_editor_style(); Now put some CSS code to match the site’s CSS into the … Read more

Subpage Conditional

Hmm, I’ll take a crack at this. There’s a few ways to go about this. Check to see if page is a direct child, check if it is an ancestor. Something like below might work for you if (283 == $post->post_parent) { echo ‘this post has a parent of 283 so do this’; }else { … Read more

List Parent page with sub pages

Found it thanks – thought I’d looked here but I must of missed it. http://codex.wordpress.org/Function_Reference/wp_list_pages#List_Sub-Pages

Create a new page for each form selection

I can’t comment yet, so I’ll tell you here what you can change immediately: $countryinfo = $wpdb->get_row(“SELECT * FROM wp_num_countries WHERE countryID = “.$country_id); to $countryinfo = $wpdb->get_row($wpdb->prepare(“SELECT * FROM wp_num_countries WHERE countryID = %d”, $country_id)); because you directly use $_POST variable, so $wpdb->prepare will format and prepare your query string. But that code looks … Read more

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