Plugin / Enhanced Category Pages

Installation

Installation

  1. Download plugin archive.
  2. Upload and uncompress it in “/wp-content/plugins/” directory.
  3. Activate the plugin through the “Plugins” menu in WordPress.
  4. Use “Enhanced Edit” link to edit the page of the respective category
  5. Category/term description display is automatically enhanced with your content.
  6. Optional: create content-ecp.php in your theme folder to customize the display.

Advanced usage options

  1. Create content-ecp.php in your theme folder to customize the display of the enhanced content. The custom post associated with category/term is set up, so all display functions for posts are usable.

    <?php
        global $enhanced_category;
        // if not previously set up, then let setup_ec_data get the current query term/category
        if (empty($categoryId)) {
            $categoryId = null;
        }
    
        // get enhanced category post and set it up as global current post
        $enhanced_category->setup_ec_data($categoryId);
    ?>
    
    <!-- enchanced category page (ECP) content -->
    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    
        <div class="post-thumbnail">
            <?php the_post_thumbnail(); ?>
        </div>
    
        <div class="entry-content">
            <?php the_content(); ?>
        </div><!-- .entry-content -->
    
        <?php edit_post_link( __( 'Edit'), '<footer class="entry-footer"><span class="edit-link">', '</span></footer><!-- .entry-footer -->' ); ?>
    
    </article><!-- #post-## -->
    
  2. Display category/term page. Edit category/taxonomy template to show the content of the “Enhanced Category” (feel free to adjust to your needs):

    //in category.php or taxonomy.php or any other place your theme displays the category/term content
    <?php
        global $enhanced_category;
        //get enhanced category post and set it up as global current post
        $enhanced_category->setup_ec_data();
    ?>
    <!-- enhanced category content -->
    <?php the_post_thumbnail("medium"); ?>
    
    <?php get_template_part( 'content', 'page' ); ?>
    
    <!-- custom fields -->
    <?php
        get_post_custom();
    ?>
    
    <?php
        // If comments are open or we have at least one comment, load up the comment template
        if ( comments_open() || get_comments_number() ) :
            comments_template();
        endif;
    ?>
    
  3. Display a list of categories:

    //$categories is presumed to be an already fetched array of categories/terms
    foreach($categories as $category) {
        $GLOBALS['enhanced_category']->setup_ec_data($category->term_id);
        the_post_thumbnail('thumbnail');
    }
    

Ratings

4.4
22 reviews

Rating breakdown

Details Information

Version

2.3.0

First Released

15 Feb, 2015

Total Downloads

36,570

Wordpress Version

3.0.1 or higher

Tested up to:

4.5.13

Require PHP Version:

-

Tags

Contributors

Languages

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.