WordPress.org

Forums

RS Simple Category Selector
How to print the selected main category on the page? (1 post)

  1. Zarce Baron
    Member
    Posted 2 years ago #

    Hi!
    Is there a way to print the main category, selected among others on the edit post page editor?
    I'm trying the following code:

    <?php
                    $category = rs_get_main_category_id( $post_id );
                    echo $category;
                    ?>

    But it's not working, even if I set a number for the array, like this:

    <?php
                    $category = rs_get_main_category_id( $post_id );
                    echo $category[0];
                    ?>

    Thanx.

    http://wordpress.org/extend/plugins/rs-simple-category-selector/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • RS Simple Category Selector
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic