Echo Particular Post in WP

Hi Experts,

I just purchased a Theme, Appointment Pro, which is pretty good, but in the Home page how can I add a custom section?

The custom section is "Company Values", so mostly text. I was thinking of using a post, then using PHP, how can I just echo the body of particular post in the Home page?

FYI, I will not be using Posts as Blog, so no need to worry to filter something out.

Thank you,
APD TorontoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mohan singhWeb developerCommented:
which type data you really want to post ..?
0
Mlungisi NdlelaFounder of MCSIDevelopers also a software developerCommented:
Also can you please include portion of the code where you want to post your data to.
0
Julian HansenCommented:
This is dependent on the theme - there is no generic solution for it.

A theme will control what content is included on a page - each theme approaches this differently. Some themes will allow you customise the page through the dashboard, others make specific provision for widget areas.

In some cases you can go to the home page - check what template it is based on then

- Create a child theme
- Copy the template used for the home page and rename it to custom-home.php or similar
- Make the text changes you want
- Go into the Pages and change the template for the home page to the new page

Note the above is theme dependent - you would need to look at how your theme is constructed and see what provisions they have made for customisation and work around those.
0
gr8gonzoConsultantCommented:
The simplest method to get a post and display it's content with PHP is:

$post = get_post(12345); // Where 12345 is the post ID you want
echo $post->post_content;

Open in new window


If you have any plugins/filters in the future that will impact the content of the post, you can apply the "the_content" plugin hook to ensure that all the required plugins run on the content first:

$post = get_post(12345); // Where 12345 is the post ID you want
echo apply_filters('the_content', $post->post_content);

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.