WordPress.org

Ready to get started?Download WordPress

Forums

Ninja Page Categories and Tags
[resolved] No pages appear in category feed (7 posts)

  1. venkmanuk
    Member
    Posted 1 year ago #

    I've never used the plugin before, but installed it and can't get pages to show up in category feeds.

    posts with the same category work fine.

    i also tried to use some code in functions.php to allow page categories - but that didn't work either.

    // Adds categories to pages
    add_action('admin_init', 'reg_tax');
    function reg_tax() {
    register_taxonomy_for_object_type('category', 'page');
    add_post_type_support('page', 'category');
    }

    what's goin on!? any ideas?

    http://wordpress.org/extend/plugins/ninja-page-categories-and-tags/

  2. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    You could have a plugin or theme that is interfering with it or you didn't activate the appropriate settings? It also depends on where you are looking. Sometimes people are looking at the actual category archive page and that's why they aren't seeing the pages appropriately.

    It's hard to say without seeing what's happening in your admin.

  3. venkmanuk
    Member
    Posted 1 year ago #

    hi James, thanks for the reply.

    here's what it was ! ( silly )
    my page was using: get_posts($args); and because i was now looking for pages with tags - not posts - it found nothing.

    replaced it with: get_pages($args); and all is right with the world.

  4. venkmanuk
    Member
    Posted 1 year ago #

    hmm, it still didn't actually fix it for me. that just showed all pages. im trying to just display that one category. i don't mind if it's on a custom template or an archive.

    1. installed plugin.
    2. checked the page categories box in settings.
    3. pages have categories assigned
    4. ??

    how can i see the list / loop of these pages?

  5. venkmanuk
    Member
    Posted 1 year ago #

    @venkmanuk try this:

    <?php
    
       $pages = get_pages();
    
    foreach ($pages as $page) {
    
        $category = get_the_category($page->ID);
    	$chek = $category[0]->cat_name;
    	//echo $chek;
    
    	if ( $chek == "My Category" ) { echo "yes, the channel = My Category and post title = "; echo $page->post_title; echo "<br />"; }
    
    }
        ?>

    you should see a list of the PAGES under that category, and their titles. so you need to set the categories to go check and that should be you.

  6. James Laws
    The WP Ninjas
    Plugin Author

    Posted 1 year ago #

    Now that you have categories being added to pages you certainly can write custom queries to loop through those however this plugin simply adds pages you have categorized to the default category archive query generally found at: http://YOURDOMAIN.com/category/YOUR-CATEGORY/

  7. venkmanuk
    Member
    Posted 1 year ago #

    :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic