Skip to main content
added 204 characters in body
Source Link
Nathan Powell
  • 1.6k
  • 1
  • 13
  • 31

EDIT: deleted incorrect information

I see what you are missing now. Without knowing the specifics, I tried to point you in the right direction with this:

$my_query = new WP_Query('post_type=sliders&p=411');

if( $my_query->have_posts() ) {
    while ( $my_query->have_posts() ) : $my_query->the_post();
        the_post()  ;

        // Get the specific meta data for the current post
        $saved_slider_meta = get_post_meta( get_the_ID(), 'slider_meta_key' );

        // Echo the data
        echo $saved_slider_meta;

    endwhile;
     
    // Restore original post data if there are other loops
    wp_reset_post_data();
}

Here is more information about WP_Query.

EDIT: deleted incorrect information

I see what you are missing now. Without knowing the specifics, I tried to point you in the right direction with this:

$my_query = new WP_Query('post_type=sliders&p=411');

if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post();
        the_post()  ;

        // Get the specific meta data for the current post
        $saved_slider_meta = get_post_meta( get_the_ID(), 'slider_meta_key' );

        // Echo the data
        echo $saved_slider_meta;

    endwhile;
}

EDIT: deleted incorrect information

I see what you are missing now. Without knowing the specifics, I tried to point you in the right direction with this:

$my_query = new WP_Query('post_type=sliders&p=411');

if( $my_query->have_posts() ) {
    while ( $my_query->have_posts() ) : $my_query->the_post();

        // Get the specific meta data for the current post
        $saved_slider_meta = get_post_meta( get_the_ID(), 'slider_meta_key' );

        // Echo the data
        echo $saved_slider_meta;

    endwhile;
     
    // Restore original post data if there are other loops
    wp_reset_post_data();
}

Here is more information about WP_Query.

Post Undeleted by Nathan Powell
added 373 characters in body
Source Link
Nathan Powell
  • 1.6k
  • 1
  • 13
  • 31

Your query arguments lookEDIT: deleted incorrect information

I see what you are missing now. TryWithout knowing the specifics, I tried to point you in the right direction with this:

$args$my_query = arraynew WP_Query('post_type=sliders&p=411');

if( $my_query->have_posts() ) {
    'post_type'while =>($my_query->have_posts()) sliders,: $my_query->the_post();
    'ID' => '411',
  the_post()  ;

$my_query        // Get the specific meta data for the current post
        $saved_slider_meta = newget_post_meta( WP_Queryget_the_ID(), $args'slider_meta_key' );

        // Echo the data
        echo $saved_slider_meta;

    endwhile;
}

Your query arguments look incorrect. Try:

$args = array(
    'post_type' => sliders,
    'ID' => '411',
);

$my_query = new WP_Query( $args );

EDIT: deleted incorrect information

I see what you are missing now. Without knowing the specifics, I tried to point you in the right direction with this:

$my_query = new WP_Query('post_type=sliders&p=411');

if( $my_query->have_posts() ) {
    while ($my_query->have_posts()) : $my_query->the_post();
        the_post()  ;

        // Get the specific meta data for the current post
        $saved_slider_meta = get_post_meta( get_the_ID(), 'slider_meta_key' );

        // Echo the data
        echo $saved_slider_meta;

    endwhile;
}
Post Deleted by Nathan Powell
Source Link
Nathan Powell
  • 1.6k
  • 1
  • 13
  • 31

Your query arguments look incorrect. Try:

$args = array(
    'post_type' => sliders,
    'ID' => '411',
);

$my_query = new WP_Query( $args );