{"id":45118,"date":"2011-11-25T21:21:42","date_gmt":"2011-11-25T21:21:42","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/force-fields\/"},"modified":"2011-11-25T21:35:34","modified_gmt":"2011-11-25T21:35:34","slug":"force-fields","status":"closed","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/force-fields\/","author":7653753,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.0","stable_tag":"1.0.0","tested":"3.2.1","requires":"3.1.4","requires_php":"","requires_plugins":"","header_name":"Force Fields","header_author":"Thomas J Bradley","header_description":"","assets_banners_color":"","last_updated":"2011-11-25 21:35:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/thomasjbradley\/force-fields","header_author_uri":"http:\/\/thomasjbradley.ca\/","rating":5,"author_block_rating":0,"active_installs":10,"downloads":1107,"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":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[83,225,2010,11671,2994],"plugin_category":[43],"plugin_contributors":[91556],"plugin_business_model":[],"class_list":["post-45118","plugin","type-plugin","status-closed","hentry","plugin_tags-admin","plugin_tags-cms","plugin_tags-custom-fields","plugin_tags-extra-content","plugin_tags-metadata","plugin_category-customization","plugin_contributors-thomasjbradley","plugin_committers-thomasjbradley"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/force-fields.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Force Fields extends the wonderful <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a> plugin by allowing developers to hide or show input boxes created by More Fields on a per template basis.<\/p>\n\n<p><strong>Requires <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a> 2.0.5 or higher.<\/strong><\/p>\n\n<p>You can choose to only show specific boxes or omit specific boxes, on a per template basis. Default box sets can be set up in your theme's <code>page.php<\/code> file.<\/p>\n\n<h4>How to use<\/h4>\n\n<p>After installing <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a>, create as many boxes as you would like, assigning their <em>Used with post types<\/em> option to <em>Page<\/em>.<\/p>\n\n<p><strong>Showing specific boxes<\/strong><\/p>\n\n<p>Open one of your template files and edit the header comment, adding the <em>Fields<\/em> directive.<\/p>\n\n<pre><code>\/*\nTemplate Name: Example\nFields: 'Example More Fields Box' 'Example Box 2'\n*\/\n<\/code><\/pre>\n\n<p>Notice the <em>Fields<\/em> line, it specifies which boxes should be visible for this template\u2014all other boxes will be hidden. <strong>The name specified for the box in the <em>Fields<\/em> directive comes from the <em>Title of the box<\/em> option for the <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a> box.<\/strong> You could alternatively use the ID generated by <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a>. Single or double quote marks are OK.<\/p>\n\n<p>The above <em>Fields<\/em> directive could also be written as:<\/p>\n\n<pre><code>\/*\nTemplate Name: Example\nFields: only 'Example More Fields Box' 'Example Box 2'\n*\/\n<\/code><\/pre>\n\n<p>Notice the extra word <code>only<\/code>; it's optional, but you can add it in if you want to be extra specific.<\/p>\n\n<p><strong>Hiding specific boxes<\/strong><\/p>\n\n<p>Where the <code>only<\/code> option will show the specified boxes, hiding all others, the <code>omit<\/code> option works in reverse: showing all the boxes except the specified ones.<\/p>\n\n<pre><code>\/*\nTemplate Name: Example\nFields: omit 'Example Box 2'\n*\/\n<\/code><\/pre>\n\n<p>The above <em>Fields<\/em> directive will show all boxes on the page edit screen except <code>Example Box 2<\/code>.<\/p>\n\n<p>Many boxes can, of course, be omitted:<\/p>\n\n<pre><code>\/*\nTemplate Name: Example\nFields: omit 'Example Box 2' 'Example Box 3'\n*\/\n<\/code><\/pre>\n\n<p><strong>Hiding all boxes<\/strong><\/p>\n\n<p>All the boxes can be hidden for a template using the <code>omit-all<\/code> option.<\/p>\n\n<pre><code>\/*\nTemplate Name: Example\nFields: omit-all\n*\/\n<\/code><\/pre>\n\n<p><strong>Defaults and page.php<\/strong><\/p>\n\n<p>By putting the <em>Fields<\/em> directive in the <code>page.php<\/code> file, you can set default boxes for pages that use the default template, or don't specify their own <em>Fields<\/em> directive.<\/p>\n\n<p>Just add something like this to the top of your <code>page.php<\/code>:<\/p>\n\n<pre><code>\/*\nFields: 'Example Box 3'\n*\/\n<\/code><\/pre>\n\n<!--section=installation-->\n<h4>How to install Force Fields:<\/h4>\n\n<ol>\n<li>Install <a href=\"http:\/\/wordpress.org\/extend\/plugins\/more-fields\/\">More Fields<\/a>, version 2.0.5 or higher<\/li>\n<li>Upload the <code>force-fields<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate Force Fields through the <em>Plugins<\/em> menu in WordPress<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"Extends the More Fields plugin, allowing developers to hide or show input boxes per template.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/45118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=45118"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/thomasjbradley"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=45118"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=45118"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=45118"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=45118"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=45118"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=45118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}