How do I show current post content in the header?

The simplest solution is to call the_post() to setup the post data before calling the template functions. <?php if(have_posts()) : the_post(); ?> //your header code here <?php rewind_posts(); //to set the post pointer back to the beginning ?> <?php else : ?> //alternative header code here <?php endif; ?>

Query does not return content

You shouldn’t be using query_posts() here, but rather WP_Query(). (Search WPSE for query_posts if you want to know wy.) <?php $custom_query_args = array( ‘post_type’ => ‘page’, ‘post_parent’ => ’50’, ‘post_status’ => ‘publish’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘posts_per_page’ => ‘100’ ); $custom_query = new WP_Query( $custom_query_args ); // To see the contents of the … Read more

Extract a link in the_content()

You’re just looking in the wrong place: php > $txt=”<a href=”http://tumblr.everlane.com/page/4″>Everlane Tumblr</a>”; php > $matches = array(); php > echo preg_match_all(‘#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#’, $txt, $matches); 1 php > print_r($matches); Array ( [0] => Array ( [0] => http://tumblr.everlane.com/page/4 ) [1] => Array ( [0] => 4 ) )

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