How to write short code with if else to get page_id?

I use this maybe helpfull <?php $title = get_the_title($post); $parent_title = get_the_title($post->post_parent); echo $title; echo $parent_title; ?> <?php global $post; //wordpress post global object if($post->post_type == ‘page’){ $content .= ‘<br /> This item is a page and the ID is: ‘.$post->ID; } elseif($post->post_type == ‘post’) { $content .= ‘<br /> This item is a post … Read more

WordPress is picking up links that don’t exist

Your site has many issues, firstly your jquery is not loading correctly. If I look at what your server is giving me I expected to find a minimised copy of jquery, instead I got a html meta refresh tag. Because of this, I then get around 10 errors caused by a missing jquery library. Then, … Read more

my theme automatically adds new pages to menu

I analyze your hard code from functions.php and my only shot is in lines with header() php function. I can’t see clearly but they can redirect you and run some code twice. Please try to comment them and look if this is the reason.

how to add a page

The code you have pasted has errors – the get_header() is fine but then you have HTML code in PHP code areas. Also you have included the header twice. Check this code out http://pastebin.com/mH2tn3Qw The header code should be placed in header.php if you are using the get_header() call

Custom wp_list_pages() function

No, it is not possible. you will want to use WP_Query() Here is the Codex Article on that. Example: <?php // Query All Pages $my_query = new WP_Query( ‘post_type=page’ ); // The Loop while ( $my_query->have_posts() ) : $my_query->the_post(); echo ‘<h2>’ . get_the_title() . ‘</h2><p>’ . get_the_excerpt() . ‘</p>’; endwhile; ?>

How to handle parent and child pages?

Problem 2: displaying the 3 panels. Do I set these up as individual children elements? If so, how can I style each one differently as it loops through? There are only 3 items. Don’t loop through them. Use get_posts() to place them in an array and then step through each array item: $panels = get_posts( … Read more

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