facing problems with getpost method
-
Hi i am new to wordpress , from past two days i am juggling here and there for solution but i failed to get one, please help me.
My problem is , i am using fiction theme in that i wanted two different headers for my pages one header for home page and second header for remaining pages, and i am successful in doing this, so problem i am facing here is for home the content is displaying fine, but rest of the pages i was getting blank, so i used getpost method to fetch the page what i designed using visual composer, here is the quick glance of my page.phpif (!is_page( ‘taskican home’ ))
{get_header( ‘bhargav’ );
$post_7 = get_post(3736);
$con = sanitize_post_field( ‘post_content’, $post_7->post_content, $post->ID, ‘display’ );
echo $con; // here i am facing problem, i am getting the page what i have designed but with no layout i.e it is displaying with layout code
get_footer();
}
else{templating_singular(‘Page’); }i am getting the output content in my pages as
[vc_row][vc_column width=”1/1″][vc_column_text]( I am text block. Click edit button to change this text. sflskfjsdf sflskjflkjsdf sfsdkflksjdfsd fsdfmlksdjflkjsdfdsfdsfsdfdsf) my content
[/vc_column_text][/vc_column][/vc_row]
please help me i am new to wordpress
The topic ‘facing problems with getpost method’ is closed to new replies.