wordpress – get_post (ID) -> post_content does not work !! (local server)

I start a project with the wordpress type "one page template" in which I have to list ALL pages in 1 single. For that, I use get_post (id) but the post_content attribute of the pages objects displays empty content !! The contents that I have for the moment are the proof and are only those of Lorem Ipsum.

An idea? I leave the code part.

Basically, I retrieve the registered main menu pages, where I get the IDs of each, then a switch to view the contents of each in the most convenient way, but I only get a void post_content!


post_status == "publish"):
switch ($ page-> ID):
PAGES case['inicio']:
pause // ignore the beginning, because that is the cursor. We make sure to omit it.

PAGES case['empresa']?>
<section class = "company has-padding" id = "">
                        

title?>

ID) -> post_content; ?>

I leave the output print_r () of one of the page objects corresponding to the ID "company":

[1]    => Subject WP_Post
(
        [ID] => 21
        [post_author] => 1
        [post_date] => 2018-11-14 02:09:21
        [post_date_gmt] => 2018-11-14 02:09:21
        [post_content] =>  
        [post_title] => 
        [post_excerpt] => 
        [post_status] => publish
        [comment_status] => closed
        [ping_status] => closed
        [post_password] => 
        [post_name] => 21
        [to_ping] => 
        [pinged] => 
        [post_modified] => 2018-11-16 07:35:58
        [post_modified_gmt] => 2018-11-16 07:35:58
        [post_content_filtered] => 
        [post_parent] => 0
        [guid] => http: // localhost / katari /? p = 21
        [menu_order] => 2
        [post_type] => nav_menu_item
        [post_mime_type] => 
        [comment_count] => 0
        [filter] => gross
        [db_id] => 21
        [menu_item_parent] => 0
        [object_id] => 7
        [object] => page
        [type] => post_type
        [type_label] => Page
        [url] => http: // localhost / katari / company /
        wordpress - get_post(ID) -> post_content no funciona!! (servidor local) => Company
        [target] => 
        [attr_title] => 
        [description] => 
        [classes] => Table
(
                [0] =>
)

        [xfn] =>
)

As you can see, I'm empty -> post_content and the same thing happens with all the other pages!