• Resolved Hoppipolla

    (@hoppipolla)


    Hi,

    I created an author page for my webzine, which works fine, but I’d like to add a custom post type in my query and can’t make it work.

    My current code is :

    <?php
    if(isset($_GET['author_name'])) :
    $curauth = get_userdatabylogin($author_name);
    else :
    $curauth = get_userdata(intval($author));
    endif;
    ?>
    
    <?php
    query_posts($query_string.'&posts_per_page=-50');
    if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    (content goes here)
    <?php endwhile; wp_reset_query(); ?>

    I’d like to display both posts and custom post type “bref” in this query. I tried to work with this page of WordPress Codex, but I still can’t display my custom post type.

    Any help is appreciated,

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Query Troubleshooting & custom post type’ is closed to new replies.