Title: Page Meta
Author: Steve
Published: <strong>October 14, 2009</strong>
Last modified: March 19, 2013

---

Search plugins

![](https://ps.w.org/pagemeta/assets/banner-772x250.png?rev=617720)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/pagemeta_f8f8f8.svg)

# Page Meta

 By [Steve](https://profiles.wordpress.org/stvwhtly/)

[Download](https://downloads.wordpress.org/plugin/pagemeta.1.5.1.zip)

 * [Details](https://li.wordpress.org/plugins/pagemeta/#description)
 * [Reviews](https://li.wordpress.org/plugins/pagemeta/#reviews)
 *  [Installation](https://li.wordpress.org/plugins/pagemeta/#installation)
 * [Development](https://li.wordpress.org/plugins/pagemeta/#developers)

 [Support](https://wordpress.org/support/plugin/pagemeta/)

## Description

This plugin uses custom fields to allow the page title tag to be customised and 
differ from the actual page title.

Both meta descriptions and keywords can also be added if required.

Page meta details can be modified on any publicly accessible post type, such as 
posts and pages, as well as custom post types.

Theme and plugin developers should note that it is possible override the page title
within your templates by setting `$wppm_title = 'Newly defined title';` before the
call to `get_header();`.

## Screenshots

 * [[
 * The Page Meta panel displayed below the content editor.
 * [[
 * Settings are managed via the Settings > Reading page.

## Installation

Here we go:

 1. Upload the `pagemeta` folder to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Choose which post types the plugin should be enabled on via the `Settings > Reading`
    options.

## FAQ

  What custom field names does it use?

The field names used are `_pagemeta_title`, `_pagemeta_description` and `_pagemeta_keywords`.

The underscore prefix prevents it from being displayed in the list of custom fields.

  How do I output the custom title?

If a custom title is set for a post type, the plugin will automatically hook into
the `wp_title` function to modify the output.

This uses the parameters passed via [wp_title](https://codex.wordpress.org/Function_Reference/wp_title)
and will completely override the title.

You can customise the output further using the `pagemeta_title` filter, which uses
the same parameters plus the original post title value.

In this example we prefix the original title to the custom title.

    ```
    add_filter( 'pagemeta_title', function( $title, $sep, $seplocation, $original_title ) {
        return $original_title . $title;
    }, 10, 4 );
    ```

Please refer to the Codex for further information on the [add_filter](https://codex.wordpress.org/Function_Reference/add_filter).

  Why are the meta tags not added to my pages?

This plugin makes use of the `wp_head` hook action, therefore in order for it to
work there must be a call to wp_head in the current theme header file.

More information on this can be found in the [WordPress Codex](https://codex.wordpress.org/Function_Reference/wp_head).

  Can I modify which fields are shown?

Yes, as of version 1.5 you can modify which fields are used using the `pagemeta_fields`
filter:

    ```
    add_filter( 'pagemeta_fields', function( $fields ) {
        $fields['author'] = 'Author'; // Add a new field.
        unset( $fields['keywords'] ); // Remove a default field.
        return $fields;
    } );
    ```

The default fields are ‘title’, ‘description’ and ‘keywords’.

  Can I output the meta values?

The page meta values can be output within posts using the `[postmeta]` shortcode.

Passing through a `name` attribute will determine which value is returned, for example
to output the description value use the following.

    ```
    [postmeta name="description"]
    ```

Name values are determined by the fields set, by default these are ‘title’, ‘description’
and ‘keywords’.

To output meta values in template files, you can make use of `the_pagemeta` function.

    ```
    <?php if ( function_exists( 'the_pagemeta' ) ) { the_pagemeta( 'description' ); } ?>
    ```

This will output the value, in order to return the value or lookup a specific post
ID you can use `get_the_pagemeta`.

    ```
    <?php if ( function_exists( 'get_the_pagemeta' ) ) { 
        $description = get_the_pagemeta( 'description' );
    } ?>

    <?php if ( function_exists( 'get_the_pagemeta' ) ) {
        $description = get_the_pagemeta(
            'description', // Page meta value name
            123 // Post ID to lookup
        );
    } ?>
    ```

Not that these functions will return the raw values prior to any output manipulation.

## Reviews

![](https://secure.gravatar.com/avatar/9f4e1eae012d4d0d383d67d5f9b437feba79f2793638749cdcdb85186a01d3d6?
s=60&d=retro&r=g)

### 󠀁[Good but using deprecated featues](https://wordpress.org/support/topic/good-but-using-deprecated-featues/)󠁿

 [osu9400](https://profiles.wordpress.org/osu9400/) April 2, 2017

Turn on WP debug logging and you will see warnings. [01-Apr-2017 23:37:34 UTC] PHP
Deprecated: Methods with the same name as their class will not be constructors in
a future version of PHP; PageMeta has a deprecated constructor in /<site>/wp-content/
plugins/pagemeta/index.php on line 11

 [ Read all 3 reviews ](https://wordpress.org/support/plugin/pagemeta/reviews/)

## Contributors & Developers

“Page Meta” is open source software. The following people have contributed to this
plugin.

Contributors

 *   [ Steve ](https://profiles.wordpress.org/stvwhtly/)

[Translate “Page Meta” into your language.](https://translate.wordpress.org/projects/wp-plugins/pagemeta)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/pagemeta/), check out
the [SVN repository](https://plugins.svn.wordpress.org/pagemeta/), or subscribe 
to the [development log](https://plugins.trac.wordpress.org/log/pagemeta/) by [RSS](https://plugins.trac.wordpress.org/log/pagemeta/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.5

 * Fix for code previously committed in error, preventing edit page functionality.

#### 1.5

 * Added ability to filter / modify meta boxes using the `pagemeta_fields` filter.
 * Custom titles can now be filtered using `pagemeta_title`.
 * Meta values are now output for static pages (Front and Posts) assigned via the
   Reading Settings page.
 * For new plugin installs, the plugin will be enabled on pages as well as posts
   by default.
 * Introduced shortcode to allow values to be output in post content.
 * New `the_pagemeta` and `get_the_pagemeta` functions added.
 * Addition of basic inline documentation.

#### 1.4.1

 * Replaced PHP short tag used to display nonce field on admin edit screen panel.

#### 1.4

 * Changed plugin author and contributor names.
 * Replaced deactivation hook and tidy option with uninstall.php.
 * Modified activation hook to remove warnings during plugin activation.
 * Combined settings with Settings > Reading page.
 * Allowed meta data to be added to any public post type, instead of just posts 
   and pages.
 * Removed PHP shortcodes from edit page meta box.
 * Updated donate link.
 * Updated screenshots.

#### 1.3

 * Page title is now automatically inserted, instead of using the custom function.

#### 1.2

 * Fixed issue with WordPress 3.0+ not correctly outputting headers.

#### 1.1

 * Fixed errors when error reporting is set to all.
 * Tested the plugin in WordPress 2.9.

#### 1.0

 * Converted plugin to a class based structure.
 * Converted constants into settings page.
 * Added donate link 😉

#### 0.3.1

 * Bug fix nonce checking and addition of title override.

#### 0.3

 * Added ability to allow page meta data on posts, as well as properly escaping 
   values.

#### 0.2.1

 * Removed debugging output.

#### 0.2

 * Tested up to 2.8.5 and began optimisation of the included files.

#### 0.1

 * This is the very first version.

## Meta

 *  Version **1.5.1**
 *  Last updated **13 years ago**
 *  Active installations **800+**
 *  WordPress version ** 2.8.2 or higher **
 *  Tested up to **3.5.2**
 *  Language
 * [English (US)](https://wordpress.org/plugins/pagemeta/)
 * Tags
 * [description](https://li.wordpress.org/plugins/tags/description/)[keywords](https://li.wordpress.org/plugins/tags/keywords/)
   [meta](https://li.wordpress.org/plugins/tags/meta/)[page](https://li.wordpress.org/plugins/tags/page/)
   [seo](https://li.wordpress.org/plugins/tags/seo/)
 *  [Advanced View](https://li.wordpress.org/plugins/pagemeta/advanced/)

## Ratings

 3.3 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/pagemeta/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/pagemeta/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/pagemeta/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/pagemeta/reviews/?filter=2)
 *  [  1 1-star review     ](https://wordpress.org/support/plugin/pagemeta/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/pagemeta/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/pagemeta/reviews/)

## Contributors

 *   [ Steve ](https://profiles.wordpress.org/stvwhtly/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/pagemeta/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QPKN7EUFKAZLE)