[resolved] categoty param in get_posts (2 posts)

  1. luismldias
    Posted 2 years ago #


    I am having a problem with a simple piece of code and it's beed troubling me because, as far as i can see, the code is "by the book".

    I am trying to list all posts for a category of a custom post type. When i use the get:posts function for the post type the results are ok, but when i add the category argument it returns an empty array. Has anyone has this issue?

    The code is the following:

    $args = array(

    $newsletterPosts = get_posts($args);

    Regards and thanks in advance,

    Luis Dias

  2. luismldias
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic