This website uses cookies to remember you and improve your experience. For more info see our Privacy Policy.

Choose which cookies you allow
Necessary Required for the site to work, such as remembering this choice. Always active

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

Mobile Menu

  • Menu
  • Skip to right header navigation
  • Skip to main content

Stormhill Media

Custom websites for every type of business

Header Right

  • About
  • Websites
    • Business Websites
    • Author Websites
  • SEO
  • Portfolio
    • Author Web Design
    • Business Web Design
    • Custom Graphics
    • Logos
  • Services & Pricing
    • Author Website Packages
    • Website Hosting
    • Page Speed Optimization
    • SEO
    • Local SEO
  • MyBookTable
    • MyBookTable Support
  • Contact
  • Hire Us

Display Content of a post or page anywhere

Home » Code Snippets » Display Content of a post or page anywhere

This is useful if you have a place on the sidebar or a box on the homepage where you want to have some changeable content. Add the content to a post or page and then output it wherever you want it using this.

<?php
// know the id of the page you want to display
$theId = 668;
// get the post
$feature = get_post($theId);
// get the content for the post. You can also get anything else for the post, post_title, post_excerpt...
$content = $feature->post_content;
echo $content;
?>
« Previous
Next »

Site Footer

Quick Links:

  • Contact Us
  • Pricing & Services
  • Sitemap
  • Terms/Conditions
  • Privacy Policy
  • Business Websites
  • Author Websites
  • SEO Services
(903) 213-5266‬

Copyright © 2026 · Stormhill Media All Rights Reserved.
Website by Stormhill Media
Log in