WordPress.org

Ready to get started?Download WordPress

Forums

How to insert a post content in to a page (3 posts)

  1. archivisttr
    Member
    Posted 1 year ago #

    Hello i need to get post content in to a page. in my site there are many pages and posts.should i add a post content in to a page's spesific position. here is my example to clarify what i am talkin'about to:

    an aducational page: mysamplesite.com/cts.html (in page.php)
    Carpal Tunnel Syndrome
    Carpal tunnel syndrome (CTS) is a median entrapment neuropathy, that causes paresthesia, pain, numbness, and other symptoms in the distribution of the median nerve due to its compression at the wrist in the carpal tunnel.
    and after this sentence i want to add an another posts content in here
    mysamplesite.com/cps.html (in singlepost.php)
    Cheiralgia paresthetica is a neuropathy of the hand generally caused by compression or trauma to the superficial branch of the radial nerve.

    so i need a shortcode plugin or stg like that to do it? or any idea?
    thank you

  2. Rajan V
    Member
    Posted 1 year ago #

    Create Page template and use get_post() or get_posts() function

    http://codex.wordpress.org/Pages#Page_Templates

  3. vjpo
    Member
    Posted 1 year ago #

    The appropriate way is to use a special shortcode. What to choose - some plugin or custom function - it depends on how flexible must be this feature. E.g. an ability to display a list of posts related to some category or tag, or posts must have titles or excerpts, or to display only a content of specific post.
    I found examples
    http://wordpress.org/extend/plugins/moka-get-posts/
    http://wordpress.org/extend/plugins/display-posts-shortcode/

    But there is must be much more plugins for it.

    Simple solution also is to write function for shortcode without a plenty of options - only for displaying a content of some post according to post ID, like [showpost id=333]

    Perhaps somebody will point out some better idea.

Topic Closed

This topic has been closed to new replies.

About this Topic