• Resolved David Corradini

    (@davouid)


    Is there a way to query the story post type?

    $args = array(
    ‘posts_per_page’ => -1,
    ‘post_type’ => ‘story’,
    );
    $query = new WP_Query($args);

    Doesn’t seem to return posts…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Pascal Birchler

    (@swissspidy)

    Hi there, the post type is called web-story, not story.

    Thread Starter David Corradini

    (@davouid)

    That simple!

    Oh my god… missed it..

    Thanks

    Thread Starter David Corradini

    (@davouid)

    I must say I’m struggling with it is there a way to display them in wp query?
    I guessed a simple the_content() but not…

    marcohdzdva

    (@marcohdzdva)

    Hi, I need some help, how can I get the “Publisher logo”

    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    ???? publisher_logo;
    endwhile;
    wp_reset_postdata();

    I try with different sintaxis but I have not been able to solve it.

    Plugin Author Pascal Birchler

    (@swissspidy)

    @marcohdzdva For next time, please open a new topic with your question as this one here is resolved (and different)

    The currently active publisher logo is stored in wp_options, you could get the attachment ID via get_option( 'web_stories_active_publisher_logo' ). There is currently not an easy way to get the individual story’s publisher logo (which might differ from the currently active one).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp query’ is closed to new replies.