{"id":34589,"date":"2015-02-16T11:18:26","date_gmt":"2015-02-16T11:18:26","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/enhanced-category-pages\/"},"modified":"2016-07-14T06:35:05","modified_gmt":"2016-07-14T06:35:05","slug":"enhanced-category-pages","status":"publish","type":"plugin","link":"https:\/\/az-tr.wordpress.org\/plugins\/enhanced-category-pages\/","author":14255792,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.3.0","stable_tag":"trunk","tested":"4.5.33","requires":"3.0.1","requires_php":"","requires_plugins":"","header_name":"Enhanced Category Pages","header_author":"Ciprian Amariei, Diana Amitroaei","header_description":"","assets_banners_color":"","last_updated":"2016-07-14 06:35:05","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_donations&business=7K3XA4WQ2BUVJ&lc=US&item_name=Enhanced%20Category%20Wordpress%20Plugin&item_number=Support%20Open%20Source&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted","header_plugin_uri":"","header_author_uri":"","rating":4.4,"author_block_rating":0,"active_installs":2000,"downloads":51371,"num_ratings":23,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"0.2":"<ul>\n<li>This version adds support for 5.3<\/li>\n<\/ul>","1.0":"<ul>\n<li>Enhance a term from any taxonomy<\/li>\n<\/ul>","1.0.1":"<ul>\n<li>Bugs fixed<\/li>\n<\/ul>","1.0.2":"<ul>\n<li>traverse categories using setup_ec_data that allows now category id as parameter<\/li>\n<\/ul>","2.0.0":"<ul>\n<li>This version adds magic: automatically show the enhanced content using <code>category_description<\/code> or <code>get_the_archive_description<\/code> filters.<\/li>\n<\/ul>","2.0.1":"<ul>\n<li>Bug fixing: prevent undesired PHP warning on category_description filter and update compatibility up to WordPress 4.3.1<\/li>\n<\/ul>","2.1.0":"<ul>\n<li>New feature: WooCommerce product category can be enhanced now<\/li>\n<\/ul>","2.1.1":"<ul>\n<li>Improve code quality<\/li>\n<\/ul>","2.1.2":"<ul>\n<li>Add WordPress 4.4 compatibility<\/li>\n<\/ul>","2.1.3":"<ul>\n<li>Bug fix: correctly handle categories with apostrophes<\/li>\n<\/ul>","2.2.0":"<ul>\n<li>All in One SEO Pack plugin compatibility added<\/li>\n<\/ul>","2.2.1":"<ul>\n<li>Minor bug fix: prevent PHP notice<\/li>\n<\/ul>","2.3.0":"<ul>\n<li>Add Visual Composer compatibility<\/li>\n<li>Add Genesis Framework compatibility<\/li>\n<li>Bug fix: Woocommerce shop page does not display the description of the first product anymore<\/li>\n<li>Bug fix: archive pages were showing the content of the first item<\/li>\n<\/ul>"},"ratings":{"1":2,"2":1,"3":1,"4":1,"5":18},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":"1101510","resolution":"128x128","location":"assets"},"icon-256x256.png":{"filename":"icon-256x256.png","revision":"1101510","resolution":"256x256","location":"assets"}},"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1091245","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1091245","resolution":"2","location":"assets"},"screenshot-3.png":{"filename":"screenshot-3.png","revision":"1091245","resolution":"3","location":"assets"},"screenshot-4.png":{"filename":"screenshot-4.png","revision":"1091245","resolution":"4","location":"assets"}},"screenshots":{"1":"Enhanced Edit link in category list","2":"Enhanced Edit link in category edit","3":"Enhanced Category custom post type edit","4":"Category public view"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[610,12174,170,91,5058],"plugin_category":[57],"plugin_contributors":[82428,82430,82429],"plugin_business_model":[],"class_list":["post-34589","plugin","type-plugin","status-publish","hentry","plugin_tags-categories","plugin_tags-enhanced","plugin_tags-page","plugin_tags-taxonomy","plugin_tags-term","plugin_category-taxonomy","plugin_contributors-cip","plugin_contributors-danaila_iulian","plugin_contributors-dioneea","plugin_committers-cip"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/icon-128x128.png?rev=1101510","icon_2x":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/icon-256x256.png?rev=1101510","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/screenshot-1.png?rev=1091245","caption":"Enhanced Edit link in category list"},{"src":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/screenshot-2.png?rev=1091245","caption":"Enhanced Edit link in category edit"},{"src":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/screenshot-3.png?rev=1091245","caption":"Enhanced Category custom post type edit"},{"src":"https:\/\/ps.w.org\/enhanced-category-pages\/assets\/screenshot-4.png?rev=1091245","caption":"Category public view"}],"raw_content":"<!--section=description-->\n<p><strong>NEW<\/strong> Version 2.0.0 brings a great new feature: with some magic, if your theme displays category\/term description, then it would be <strong>automatically<\/strong> enhanced.\nAre you ready for more? You can customize the template by creating a <code>content-ecp.php<\/code> file in your theme of choice.<\/p>\n\n<p>Enhanced Category Pages allows you to create custom category and term pages by managing them using a special custom post type.<\/p>\n\n<p><strong>Premium code quality<\/strong> ensured by Codacy static analysis: <a href=\"https:\/\/www.codacy.com\/app\/2wit\/enhanced-category-pages\">grade A<\/a>.<\/p>\n\n<p><strong>Features<\/strong><\/p>\n\n<ul>\n<li><strong>NEW<\/strong> Visual Composer compatible - you can now edit the category using Visual Composer<\/li>\n<li><strong>NEW<\/strong> Genesis Framework compatible<\/li>\n<li>WooCommerce compatible - product categories can be enhanced now<\/li>\n<li>Easy to use for everyone: users, designers, developers<\/li>\n<li>Automatically show enhanced category\/term content<\/li>\n<li>Customize enhanced category\/term content by creating a <code>content-ecp.php<\/code> file in your theme of choice<\/li>\n<li>Traverse categories using setup_ec_data that allows now category id as parameter<\/li>\n<li>Enhance any taxonomy: edit <strong>any taxonomy<\/strong> term as a custom post<\/li>\n<li>Edit category as a custom post - <em>Enhanced Category<\/em><\/li>\n<li>Automatically generates <em>Enhanced Category<\/em> post type for each category<\/li>\n<li>Transparent synchronization of <em>Enhanced Category<\/em> and it's corresponding category<\/li>\n<li>Add any features available to WordPress custom posts<\/li>\n<li>Easy <em>Enhanced Category<\/em> display on category template using <code>&lt;?php $GLOBALS['enhanced_category']-&gt;setup_ec_data(); ?&gt;<\/code> (see install section)<\/li>\n<li>Internationalization ready<\/li>\n<\/ul>\n\n<p><strong>Future Features<\/strong><\/p>\n\n<ul>\n<li>customize <em>Enhanced Category<\/em> custom post type capabilities via plugin options<\/li>\n<li>manual selection on enhanced categories<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Download plugin archive.<\/li>\n<li>Upload and uncompress it in \"\/wp-content\/plugins\/\" directory.<\/li>\n<li>Activate the plugin through the \"Plugins\" menu in WordPress.<\/li>\n<li>Use \"Enhanced Edit\" link to edit the page of the respective category<\/li>\n<li>Category\/term description display is automatically enhanced with your content.<\/li>\n<li>Optional: create <code>content-ecp.php<\/code> in your theme folder to customize the display.<\/li>\n<\/ol>\n\n<p><strong>Advanced usage options<\/strong><\/p>\n\n<ol>\n<li><p>Create <code>content-ecp.php<\/code> 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.<\/p>\n\n<pre><code>&lt;?php\n    global $enhanced_category;\n    \/\/ if not previously set up, then let setup_ec_data get the current query term\/category\n    if (empty($categoryId)) {\n        $categoryId = null;\n    }\n\n    \/\/ get enhanced category post and set it up as global current post\n    $enhanced_category-&gt;setup_ec_data($categoryId);\n?&gt;\n\n&lt;!-- enchanced category page (ECP) content --&gt;\n&lt;article id=\"post-&lt;?php the_ID(); ?&gt;\" &lt;?php post_class(); ?&gt;&gt;\n\n    &lt;div class=\"post-thumbnail\"&gt;\n        &lt;?php the_post_thumbnail(); ?&gt;\n    &lt;\/div&gt;\n\n    &lt;div class=\"entry-content\"&gt;\n        &lt;?php the_content(); ?&gt;\n    &lt;\/div&gt;&lt;!-- .entry-content --&gt;\n\n    &lt;?php edit_post_link( __( 'Edit'), '&lt;footer class=\"entry-footer\"&gt;&lt;span class=\"edit-link\"&gt;', '&lt;\/span&gt;&lt;\/footer&gt;&lt;!-- .entry-footer --&gt;' ); ?&gt;\n\n&lt;\/article&gt;&lt;!-- #post-## --&gt;\n<\/code><\/pre><\/li>\n<li><p>Display category\/term page. Edit <strong>category\/taxonomy template<\/strong> to show the content of the \"Enhanced Category\" (feel free to adjust to your needs):<\/p>\n\n<pre><code>\/\/in category.php or taxonomy.php or any other place your theme displays the category\/term content\n&lt;?php\n    global $enhanced_category;\n    \/\/get enhanced category post and set it up as global current post\n    $enhanced_category-&gt;setup_ec_data();\n?&gt;\n&lt;!-- enhanced category content --&gt;\n&lt;?php the_post_thumbnail(\"medium\"); ?&gt;\n\n&lt;?php get_template_part( 'content', 'page' ); ?&gt;\n\n&lt;!-- custom fields --&gt;\n&lt;?php\n    get_post_custom();\n?&gt;\n\n&lt;?php\n    \/\/ If comments are open or we have at least one comment, load up the comment template\n    if ( comments_open() || get_comments_number() ) :\n        comments_template();\n    endif;\n?&gt;\n<\/code><\/pre><\/li>\n<li><p>Display a list of categories:<\/p>\n\n<pre><code>\/\/$categories is presumed to be an already fetched array of categories\/terms\nforeach($categories as $category) {\n    $GLOBALS['enhanced_category']-&gt;setup_ec_data($category-&gt;term_id);\n    the_post_thumbnail('thumbnail');\n}\n<\/code><\/pre><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>How does magic happen?<\/dt>\n<dd><p>We use the <code>category_description<\/code> or <code>get_the_archive_description<\/code> filters in order to replace the plain content with the enhanced one.<\/p><\/dd>\n<dt>How can I customize the output?<\/dt>\n<dd><ul>\n<li><code>content-ecp.php<\/code> and <code>content-page.php<\/code> partial templates are looked for (in that order) and the first found is loaded.<\/li>\n<\/ul><\/dd>\n<dt>What custom post type is created?<\/dt>\n<dd><p><em>Enhanced Category<\/em> (safe name: enhancedcategory) custom post type is created and a post is generated automatically for each category\/term.<\/p><\/dd>\n<dt>What happens if I edit the category fields?<\/dt>\n<dd><p><em>Enhanced Category<\/em> Post (ECP) is synchronized in both directions with it's corresponding category i.e. category name - ECP title, category slug - ECP slug, category description - ECP excerpt.<\/p><\/dd>\n<dt>What happens with *Enhanced Category* posts when the plugin is uninstalled?<\/dt>\n<dd><p><em>Enhanced Category<\/em> posts are deleted when the plugin is deleted using the WordPress plugin management page. Note: nothing is deleted when the plugin deactivated.<\/p><\/dd>\n<dt>Can I use it to list any categories\/terms?<\/dt>\n<dd><p>Yes, you can pass the category\/term id to <code>setup_ec_data<\/code> method like this (<code>$categories<\/code> is presumed to be an already fetched array of categories\/terms):<\/p>\n\n<pre><code>                foreach($categories as $category) {\n                    $GLOBALS['enhanced_category']-&gt;setup_ec_data($category-&gt;term_id);\n                    the_post_thumbnail('thumbnail');\n                }\n<\/code><\/pre><\/dd>\n<dt>Why do I get a blank screen after installing the plugin?<\/dt>\n<dd><p><em>Enhanced Category Post<\/em> (ECP) requires at least PHP 5.3 running on your server. Contact your hosting to update the PHP version.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>0.1<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Make php 5.3 compatible.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Enhance any taxonomy<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>bug fixing<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>setup_ec_data allows now category id as parameter<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>automatically show the enhanced content using <code>category_description<\/code> or <code>get_the_archive_description<\/code> filters<\/li>\n<li>customize the display of content with <code>content-ecp.php<\/code> theme partial template<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>bug-fix - prevent undesired PHP warning on category_description filter<\/li>\n<li>check and update 4.3.1 compatibility<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>WooCommerce product category can be enhanced now<\/li>\n<\/ul>\n\n<h4>2.1.1<\/h4>\n\n<ul>\n<li>Improve code quality<\/li>\n<\/ul>\n\n<h4>2.1.2<\/h4>\n\n<ul>\n<li>Add WordPress 4.4 compatibility<\/li>\n<\/ul>\n\n<h4>2.1.3<\/h4>\n\n<ul>\n<li>Bug fix: correctly handle categories with apostrophes<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>All in One SEO Pack plugin compatibility added<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Minor bug fix: prevent PHP notice<\/li>\n<\/ul>\n\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Add Visual Composer compatibility<\/li>\n<li>Add Genesis Framework compatibility<\/li>\n<li>Bug fix: Woocommerce shop page does not display the description of the first product anymore<\/li>\n<li>Bug fix: archive pages were showing the content of the first item<\/li>\n<\/ul>","raw_excerpt":"Create custom enhanced pages for categories and any taxonomy term and manage them as a custom post.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/34589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=34589"}],"author":[{"embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/cip"}],"wp:attachment":[{"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=34589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=34589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=34589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=34589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=34589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/az-tr.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=34589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}