Title: missing the layout when using the getpost method in page.php
Last modified: August 21, 2016

---

# missing the layout when using the getpost method in page.php

 *  [bhargavdt3](https://wordpress.org/support/users/bhargavdt3/)
 * (@bhargavdt3)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/)
 * hi, please help me to solve this problem, wasting time for two days.
    i am using
   get post method to display the post in the page as because i used custom header.
   so the problem i am facing is, the post is not displayed according to the design
   that i designed in visual editor, the out put is including the shortcodes like
   this `[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[/
   vc_column_text][/vc_column][/vc_row]`
 * you can check live example here [
    please help me to get my design displayed.
   Thank you

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328353)
 * are you using a plugin for the shortcodes?
 * > using get post method to display the post in the pag
 * what is the exact full code?
 * have you contacted your theme’s developer for support?
 *  Thread Starter [bhargavdt3](https://wordpress.org/support/users/bhargavdt3/)
 * (@bhargavdt3)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328382)
 * i am using visual editor to design a page, i have designed one page,but for that
   page i need different header…so what i did is i changed in page.php and used 
   getheader() and getfooter methods….but for content in the middle what i designed
   in visual editor, i am not able to display it, i used getpost method in between
   getheader and getfooter, i am able retrive the content but with no layout,it’s
   displaying like this.
 * [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[/
   vc_column_text][/vc_column][/vc_row]
 * what should i do , please help me
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328385)
 * where is the ‘getpost’ code?
 * all you have posted is a lot of shortcodes;
    – where do these shortcodes come
   from? — are they part of your theme? — are they from a plugin?
 * what theme are you working with?
 * what is the full code of page.php?
 *  Thread Starter [bhargavdt3](https://wordpress.org/support/users/bhargavdt3/)
 * (@bhargavdt3)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328386)
 * when i used getpost in page.php i getting o/p as this.
    Full code of Page.php
 * if (!is_page( ‘home’ ))
    {
 * get_header( ‘bhargav’ );
    $post_7 = get_post(3736);
 * $con = sanitize_post_field( ‘post_content’, $post_7->post_content, $post->ID,‘
   display’ );
    echo $con; get_footer(); } else{ templating_singular(‘Page’); }
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328400)
 * try:
 * `echo apply_filters( 'the_content', $con );`

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘missing the layout when using the getpost method in page.php’ is closed
to new replies.

## Tags

 * [layout](https://wordpress.org/support/topic-tag/layout/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/missing-the-layout-when-using-the-getpost-method-in-pagephp/#post-4328400)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
