{"id":6969,"date":"2009-10-14T18:34:52","date_gmt":"2009-10-14T18:34:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/pagemeta\/"},"modified":"2013-03-19T23:11:18","modified_gmt":"2013-03-19T23:11:18","slug":"pagemeta","status":"publish","type":"plugin","link":"https:\/\/kn.wordpress.org\/plugins\/pagemeta\/","author":9173491,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.1","stable_tag":"1.5.1","tested":"3.5.2","requires":"2.8.2","requires_php":"","requires_plugins":"","header_name":"Page Meta","header_author":"StvWhtly","header_description":"","assets_banners_color":"f8f8f8","last_updated":"2013-03-19 23:11:18","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_s-xclick&hosted_button_id=QPKN7EUFKAZLE","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/pagemeta\/","header_author_uri":"http:\/\/stv.whtly.com","rating":3.3,"author_block_rating":0,"active_installs":800,"downloads":32072,"num_ratings":3,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"1.4":"<p>Introduced the ability to enable page meta data on any public post type via the settings page, which has been merged into the <code>Settings &amp;gt; Reading<\/code> admin page instead of the plugin specific settings page. Ensure page meta is enabled for required post types by checking settings in the new location.<\/p>"},"ratings":{"1":"1","2":0,"3":0,"4":"1","5":"1"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":"617720","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.2.1","0.3","0.3.1","1.0","1.1","1.2","1.3","1.4","1.4.1","1.5","1.5.1"],"block_files":[],"assets_screenshots":{"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1538846","resolution":"2","location":"plugin"},"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1538846","resolution":"1","location":"plugin"}},"screenshots":{"1":"The Page Meta panel displayed below the content editor.","2":"Settings are managed via the Settings &gt; Reading page."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2210,472,683,170,186],"plugin_category":[55,57],"plugin_contributors":[79552],"plugin_business_model":[],"class_list":["post-6969","plugin","type-plugin","status-publish","hentry","plugin_tags-description","plugin_tags-keywords","plugin_tags-meta","plugin_tags-page","plugin_tags-seo","plugin_category-seo-and-marketing","plugin_category-taxonomy","plugin_contributors-stvwhtly","plugin_committers-stvwhtly"],"banners":{"banner":"https:\/\/ps.w.org\/pagemeta\/assets\/banner-772x250.png?rev=617720","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/pagemeta_f8f8f8.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/pagemeta\/trunk\/screenshot-1.png?rev=1538846","caption":"The Page Meta panel displayed below the content editor."},{"src":"https:\/\/ps.w.org\/pagemeta\/trunk\/screenshot-2.png?rev=1538846","caption":"Settings are managed via the Settings &gt; Reading page."}],"raw_content":"<!--section=description-->\n<p>This plugin uses custom fields to allow the page title tag to be customised and differ from the actual page title.<\/p>\n\n<p>Both meta descriptions and keywords can also be added if required.<\/p>\n\n<p>Page meta details can be modified on any publicly accessible post type, such as posts and pages, as well as custom post types.<\/p>\n\n<p>Theme and plugin developers should note that it is possible override the page title within your templates by setting <code>$wppm_title = 'Newly defined title';<\/code> before the call to <code>get_header();<\/code>.<\/p>\n\n<!--section=installation-->\n<p>Here we go:<\/p>\n\n<ol>\n<li>Upload the <code>pagemeta<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Choose which post types the plugin should be enabled on via the <code>Settings &gt; Reading<\/code> options.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>What custom field names does it use?<\/dt>\n<dd><p>The field names used are <code>_pagemeta_title<\/code>, <code>_pagemeta_description<\/code> and <code>_pagemeta_keywords<\/code>.<\/p>\n\n<p>The underscore prefix prevents it from being displayed in the list of custom fields.<\/p><\/dd>\n<dt>How do I output the custom title?<\/dt>\n<dd><p>If a custom title is set for a post type, the plugin will automatically hook into the <code>wp_title<\/code> function to modify the output.<\/p>\n\n<p>This uses the parameters passed via <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wp_title\" title=\"Function Reference\/wp title\">wp_title<\/a> and will completely override the title.<\/p>\n\n<p>You can customise the output further using the <code>pagemeta_title<\/code> filter, which uses the same parameters plus the original post title value.<\/p>\n\n<p>In this example we prefix the original title to the custom title.<\/p>\n\n<pre><code>add_filter( 'pagemeta_title', function( $title, $sep, $seplocation, $original_title ) {\n    return $original_title . $title;\n}, 10, 4 );\n<\/code><\/pre>\n\n<p>Please refer to the Codex for further information on the <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/add_filter\" title=\"Function Reference\/add filter\">add_filter<\/a>.<\/p><\/dd>\n<dt>Why are the meta tags not added to my pages?<\/dt>\n<dd><p>This plugin makes use of the <code>wp_head<\/code> hook action, therefore in order for it to work there must be a call to wp_head in the current theme header file.<\/p>\n\n<p>More information on this can be found in the <a href=\"http:\/\/codex.wordpress.org\/Function_Reference\/wp_head\" title=\"Function Reference\/wp head\">WordPress Codex<\/a>.<\/p><\/dd>\n<dt>Can I modify which fields are shown?<\/dt>\n<dd><p>Yes, as of version 1.5 you can modify which fields are used using the <code>pagemeta_fields<\/code> filter:<\/p>\n\n<pre><code>add_filter( 'pagemeta_fields', function( $fields ) {\n    $fields['author'] = 'Author'; \/\/ Add a new field.\n    unset( $fields['keywords'] ); \/\/ Remove a default field.\n    return $fields;\n} );\n<\/code><\/pre>\n\n<p>The default fields are 'title', 'description' and 'keywords'.<\/p><\/dd>\n<dt>Can I output the meta values?<\/dt>\n<dd><p>The page meta values can be output within posts using the <code>[postmeta]<\/code> shortcode.<\/p>\n\n<p>Passing through a <code>name<\/code> attribute will determine which value is returned, for example to output the description value use the following.<\/p>\n\n<pre><code>[postmeta name=\"description\"]\n<\/code><\/pre>\n\n<p>Name values are determined by the fields set, by default these are 'title', 'description' and 'keywords'.<\/p>\n\n<p>To output meta values in template files, you can make use of <code>the_pagemeta<\/code> function.<\/p>\n\n<pre><code>&lt;?php if ( function_exists( 'the_pagemeta' ) ) { the_pagemeta( 'description' ); } ?&gt;\n<\/code><\/pre>\n\n<p>This will output the value, in order to return the value or lookup a specific post ID you can use <code>get_the_pagemeta<\/code>.<\/p>\n\n<pre><code>&lt;?php if ( function_exists( 'get_the_pagemeta' ) ) { \n    $description = get_the_pagemeta( 'description' );\n} ?&gt;\n\n&lt;?php if ( function_exists( 'get_the_pagemeta' ) ) {\n    $description = get_the_pagemeta(\n        'description', \/\/ Page meta value name\n        123 \/\/ Post ID to lookup\n    );\n} ?&gt;\n<\/code><\/pre>\n\n<p>Not that these functions will return the raw values prior to any output manipulation.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5<\/h4>\n\n<ul>\n<li>Fix for code previously committed in error, preventing edit page functionality.<\/li>\n<\/ul>\n\n<h4>1.5<\/h4>\n\n<ul>\n<li>Added ability to filter \/ modify meta boxes using the <code>pagemeta_fields<\/code> filter.<\/li>\n<li>Custom titles can now be filtered using <code>pagemeta_title<\/code>.<\/li>\n<li>Meta values are now output for static pages (Front and Posts) assigned via the Reading Settings page.<\/li>\n<li>For new plugin installs, the plugin will be enabled on pages as well as posts by default.<\/li>\n<li>Introduced shortcode to allow values to be output in post content.<\/li>\n<li>New <code>the_pagemeta<\/code> and <code>get_the_pagemeta<\/code> functions added.<\/li>\n<li>Addition of basic inline documentation.<\/li>\n<\/ul>\n\n<h4>1.4.1<\/h4>\n\n<ul>\n<li>Replaced PHP short tag used to display nonce field on admin edit screen panel.<\/li>\n<\/ul>\n\n<h4>1.4<\/h4>\n\n<ul>\n<li>Changed plugin author and contributor names.<\/li>\n<li>Replaced deactivation hook and tidy option with uninstall.php.<\/li>\n<li>Modified activation hook to remove warnings during plugin activation.<\/li>\n<li>Combined settings with Settings &gt; Reading page.<\/li>\n<li>Allowed meta data to be added to any public post type, instead of just posts and pages.<\/li>\n<li>Removed PHP shortcodes from edit page meta box.<\/li>\n<li>Updated donate link.<\/li>\n<li>Updated screenshots.<\/li>\n<\/ul>\n\n<h4>1.3<\/h4>\n\n<ul>\n<li>Page title is now automatically inserted, instead of using the custom function.<\/li>\n<\/ul>\n\n<h4>1.2<\/h4>\n\n<ul>\n<li>Fixed issue with WordPress 3.0+ not correctly outputting headers.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Fixed errors when error reporting is set to all.<\/li>\n<li>Tested the plugin in WordPress 2.9.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Converted plugin to a class based structure.<\/li>\n<li>Converted constants into settings page.<\/li>\n<li>Added donate link ;)<\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li>Bug fix nonce checking and addition of title override.<\/li>\n<\/ul>\n\n<h4>0.3<\/h4>\n\n<ul>\n<li>Added ability to allow page meta data on posts, as well as properly escaping values.<\/li>\n<\/ul>\n\n<h4>0.2.1<\/h4>\n\n<ul>\n<li>Removed debugging output.<\/li>\n<\/ul>\n\n<h4>0.2<\/h4>\n\n<ul>\n<li>Tested up to 2.8.5 and began optimisation of the included files.<\/li>\n<\/ul>\n\n<h4>0.1<\/h4>\n\n<ul>\n<li>This is the very first version.<\/li>\n<\/ul>","raw_excerpt":"Adds the ability to override the page meta title and add in meta descriptions and keywords for pages.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/6969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=6969"}],"author":[{"embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/stvwhtly"}],"wp:attachment":[{"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=6969"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=6969"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=6969"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=6969"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=6969"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kn.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=6969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}