WordPress.org

Forums

Post Tags and Categories for Pages
Problem with gategory ID (2 posts)

  1. bepperine
    Member
    Posted 1 year ago #

    Hi

    i'm trying to use plugin, i create a category and i associate this to a page and many posts. In my page i want page content and posts with the same category. I make this

    $cat = get_query_var('cat');
    $argsText = array('category' => $cat, 'numberposts' => -1, 'post_status' => null, 'post_type' => 'post');

    $postsText = get_posts( $argsText );

    But $cat is empty. How can i get the category id of current page??
    Help me please!

    http://wordpress.org/plugins/post-tags-and-categories-for-pages/

  2. curtismchale
    Member
    Plugin Author

    Posted 1 year ago #

    This is really just a general coding question and will get more answers in the general support forums.

    The cat item will only have stuff in it by default on archive pages for categories.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post Tags and Categories for Pages
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.