WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WordPress Loop] custom_query_args documentation? (5 posts)

  1. allancole
    Member
    Posted 4 years ago #

    I’m trying to display a page using the WordPress Loop plugin widget.

    I have the post_type set to "PAGE" and I’m attempting to add my own parameters and select a page using the page_iD, query_posts parameter and the custom_query_arg option.

    I’ve tried both
    'page_id' => 23
    and
    page_id=23
    but neither seems to work. I’ve tried a few other query arguments, but none of them seem to work either.

    Am I doing this correctly?
    Is there any documentation that shows how the custom_query_arg option should be used?

  2. MichaelH
    Member
    Posted 4 years ago #

    I believe there might be a bug in the wordpress-loop.php script. If I'm reading it right then line 135 of that script:

    $args[] = wp_parse_args( $custom_args, $args );

    should be:

    $args = wp_parse_args( $custom_args, $args );

    And since Ptah has a comment in the script that says:

    //add custom query args, overrides anything, even the world!

    then your custom_query_args would be something like this:

    caller_get_posts=1&post_type=page&post_status=publish&p=23
  3. Ptah Dunbar
    Member
    Posted 4 years ago #

    page_id=23 works for me. Make sure that page id is valid. And are you using the latest WP Loop version?

    For the record, custom_query_args works like this:
    caller_get_posts=1&author=1&post_type=page&post_status=publish&orderby=title&order=ASC

  4. roburdick
    Member
    Posted 4 years ago #

    Hi,

    I love this plug-in! Does anyone know if there might be a way of avoiding duplicate posts. I want to use a loop in my sidebar widget area next to a single page post, and would like to not repeat the post that's in the main single post area.

    Thanks

  5. thibotus01
    Member
    Posted 4 years ago #

    Doesn't work for me either...

Topic Closed

This topic has been closed to new replies.

About this Topic