M
M
Maxval2014-02-21 06:31:36
WordPress
Maxval, 2014-02-21 06:31:36

Where can I get the output code for certain wordpress pages?

Hello. In a wordpress template, you need to display pages (completely) in different places.
So I'm looking for a code for this. Hooking by id.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Michael Danilov, 2014-02-21
@MonkAlbino

In the template, get data from the get_post($id) function , where $id is the ID of the post to get. Display the received data as you want and where you want.

I
Igor Vorotnev, 2014-02-21
@HeadOnFire

Either the option suggested by @MonkAlbino (returns an object), or even simpler (lighter in resources and no need to parse the object):
echo get_post_field('post_content', $post_id);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question