Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Do not show sticky posts new WP_Query

Discussion in 'Misc WordPress Requests' started by lizverd, Oct 29, 2017.

  1. lizverd

    Guest

    Reply To: Do not show sticky posts new WP_Query, by lizverd

    Fixed on 'ignore_sticky_posts' => 0,
    but the problem in the other was:
    $cat_id = ts_get_option('settings_theme_cat_id');
    in $cat_id is displayed id category, from which posts are displayed
    Here’s an example of what happens:

    $args = array(
    'cat' => 1, only one ID is displayed
    'ignore_sticky_posts' => 0,
    );

    if escape this line //'cat' => $cat_id,
    immediately displays the class sticky and the necessary sticky post, but will output all the categories, that I do not need

    I can not understand why this is happening…

    Reply To: Do not show sticky posts new WP_Query
     
    #1

Share This Page

Web Hosting