Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Erikvona

    (@erikvona)

    The same question was asked in this support thread.

    Simply put, this plugin does not work with custom post types, because depending on the post type, it may not be possible and cause some incompatibilities. However, for most custom post type, the following will work:

    In the perpagehead.php file, on line 18, replace the following:
    $screens = array( 'post', 'page' );
    with
    $screens = array( 'post', 'page', 'custom-post-slug' );
    Where custom-post-slug is the slug for the custom post type.
    Note that after modifying the plugin, you should not update it. Any update will reset the modifications.

    You can also manually add the content you want to add to the head section, by going to screen options and checking Custom Fields, and then using the custom field box to add a field with the name per-page-ath-content. Anything put in that field will be added in the head section, and this doesn’t require modification of the plugin. However, some errors may occur in the preserving of whitespace, and the escaping of quotes.

    I will see about adding support for custom post types via a settings page in the future (for now I am not feeling like it), but for now, this is the way to do it.

    Thread Starter Husein Yuseinov

    (@webg)

    Worked perfectly. Thanks!

    Plugin Author Erikvona

    (@erikvona)

    Custom post support is added in version 1.2, which will probably launch today. You can now set the custom post types you want to add stuff to under Settings -> Per Page Add To Head.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Not working on custom pages?’ is closed to new replies.