{"id":2092,"date":"2007-09-26T23:10:34","date_gmt":"2007-09-26T23:10:34","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/classy-wp-list-pages\/"},"modified":"2011-02-04T18:13:15","modified_gmt":"2011-02-04T18:13:15","slug":"classy-wp-list-pages","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/classy-wp-list-pages\/","author":232107,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.4,0","stable_tag":"1.4.0","tested":"3.0.5","requires":"2.2","requires_php":"","requires_plugins":"","header_name":"Classy wp_list_pages","header_author":"Alex Dunae","header_description":"","assets_banners_color":"","last_updated":"2011-02-04 18:13:15","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/code.dunae.ca\/classy_wp_list_pages","header_author_uri":"http:\/\/dunae.ca\/","rating":0,"author_block_rating":0,"active_installs":60,"downloads":14984,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.1.1","1.2","1.2.1","1.2.2","1.3","1.3.1","1.3.2","1.4.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1241,356,2302,175,1976],"plugin_category":[59],"plugin_contributors":[77669],"plugin_business_model":[],"class_list":["post-2092","plugin","type-plugin","status-publish","hentry","plugin_tags-class","plugin_tags-css","plugin_tags-id","plugin_tags-links","plugin_tags-style","plugin_category-utilities-and-tools","plugin_contributors-alexdunae","plugin_committers-alexdunae"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/classy-wp-list-pages.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin adds classes or IDs (your choice) to the <code>LI<\/code> tags generated by WordPress' <code>wp_list_pages()<\/code> and <code>wp_nav_menu()<\/code> functions.<\/p>\n\n<p>I found it very frustrating to style the output of these menus without having access to these attributes. This plugin allows you to style the output of <code>wp_list_pages()<\/code> and <code>wp_nav_menu()<\/code> with CSS.<\/p>\n\n<p>The class name or ID is derived from the URL of the page.<\/p>\n\n<p>For example,<\/p>\n\n<ul>\n<li><code>\/about\/<\/code> could have the class <code>about<\/code>. <\/li>\n<li><code>\/about\/faq\/<\/code> could have the class <code>about_faq<\/code>.<\/li>\n<\/ul>\n\n<p>If a page does not have a URL (e.g. your front page) the plugin will set the <code>class<\/code> or <code>id<\/code> (depending on what you selected) to <code>frontpage<\/code>, adding whatever prefix you requested.<\/p>\n\n<p>For example,<\/p>\n\n<ul>\n<li><code>\/<\/code> could have the class <code>pg_frontpage<\/code>. <\/li>\n<\/ul>\n\n<p>Existing classes (e.g. <code>page_item<\/code> or <code>current<\/code>) are left untouched.<\/p>\n\n<h4>Sample output<\/h4>\n\n<pre><code>&lt;li id=\"nav-a-new-page\" class=\"first page_item page-item-4\"&gt;&lt;a href=\"http:\/\/example.com\/a-new-page\/\" title=\"A new page\"&gt;A new page&lt;\/a&gt;&lt;\/li&gt;\n&lt;li id=\"nav-about\" class=\"page_item page-item-2\"&gt;&lt;a href=\"http:\/\/example.com\/about\/\" title=\"About\"&gt;About&lt;\/a&gt;&lt;\/li&gt;\n&lt;li id=\"nav-another-new-page\" class=\"last page_item page-item-6\"&gt;&lt;a href=\"http:\/\/example.com\/another-new-page\/\" title=\"Another new page\"&gt;Another new page&lt;\/a&gt;&lt;\/li&gt;\n<\/code><\/pre>\n\n<h4>Configuration<\/h4>\n\n<p>Using the <code>Classy wp_list_pages<\/code> tab in the options panel you can choose whether you want to use IDs or classes, set the token separator and add an optional token prefix.<\/p>\n\n<p>You can also specify a class to add to the first and last items in a list.<\/p>\n\n<p>Pretty straight forward...<\/p>\n\n<h3>Contact and Credits<\/h3>\n\n<p>Written by Alex Dunae ( <a href=\"http:\/\/dunae.ca\/\">dunae.ca<\/a> ), e-mail 'code' at the same domain), 2007-09.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip <code>classy_wp_list_pages.zip<\/code> in your<code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Navigate the the <code>Classy wp_list_pages<\/code> tab in the options panel to configure the plugin.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Add support for wp_nav_menu()<\/li>\n<li>Fix frontpage support<\/li>\n<\/ul>\n\n<h4>1.3.2<\/h4>\n\n<ul>\n<li>Fixed <code>register_setting<\/code> process (thanks to <a href=\"http:\/\/profiles.wordpress.org\/simplistik\/\">simplistik<\/a> in the forums).<\/li>\n<li>Fixes to the way the <code>last<\/code> class is applied (thanks to <a href=\"http:\/\/profiles.wordpress.org\/deanoakley\/\">deanoakley<\/a> in the forums).<\/li>\n<\/ul>\n\n<h4>1.3.1<\/h4>\n\n<ul>\n<li>Fixed bug with nested pages and the <code>last<\/code> class (thanks to <a href=\"http:\/\/wordpress.org\/support\/topic\/344080\">iron77<\/a> in the forums).<\/li>\n<li>Added uninstall script (thanks to <a href=\"http:\/\/wordpress.org\/support\/topic\/343184\">Casemon<\/a> in the forums).<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Ability to specify a class to add to the first and list items in a list.<\/li>\n<li>Fixed EOL regex in 'last' class regexp.<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li><code>siteurl<\/code> bug fix (thanks to <a href=\"http:\/\/noscope.com\">Joen Asmussen<\/a> for the bug report).<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>Changed <code>get_option('siteurl')<\/code> to <code>get_option('home')<\/code>.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Updated options handle for WP 2.7.<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Added fallback identifier for pages without URLs (thanks to Dave Penfold for the bug report).<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added support for IDs and custom prefixes and separators.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial version.<\/li>\n<\/ul>","raw_excerpt":"Adds a uniqe class or ID attribute to each LI tag generated by wp_list_pages() and wp_nav_menu() allowing them to be individually styled with CSS.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2092"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/alexdunae"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2092"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2092"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2092"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2092"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2092"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}