WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] query pages and posts with shortcodes (2 posts)

  1. infohowdy
    Member
    Posted 2 years ago #

    Hello, for query a page by id I use

    $page_id = 10;
    $paget_data = get_page( $page_id );
    echo $page_data->post_content;
    edit_post_link(), '<span class="edit-link">', '</span>', $page_id )

    This shortcodes inside the content does not works.

    I alredy try to query the page by the samples here http://codex.wordpress.org/Function_Reference/query_posts

    query_posts( "p=10" );
    while ( have_posts() ) : the_post();
    the_content();
    endwhile;
    wp_reset_query();

    but I get nothing.

  2. infohowdy
    Member
    Posted 2 years ago #

    I wrong, the query must be query_posts( "page_id=10" );

Topic Closed

This topic has been closed to new replies.

About this Topic