WordPress.org

Ready to get started?Download WordPress

Forums

How do I insertsomething into the section from a plugin? (4 posts)

  1. Andy McCoy
    Member
    Posted 3 years ago #

    Maybe it's a newbe question, but, how do I insertsomething into the <head> section from a plugin?

    /Andy

  2. Mark / t31os
    Moderator
    Posted 3 years ago #

    Plugins don't typically have a <head>, please provide more details about what it is you're talking about, ie. what are you aiming to do and is there a particular plugin involved.

  3. Andy McCoy
    Member
    Posted 3 years ago #

    Well ...I would like to insert some html <meta> tags into the html <head> section from a plugin.

    The plugin is parsing the content for videos, and I would like to insert the proper Open Graph <meta> tags, so that Facebook can discover embeded video.

    /Andy

  4. Mark / t31os
    Moderator
    Posted 3 years ago #

    If i assume you want to output content into head section for front facing pages of your site, then what you're looking for are actions and filters.

    http://codex.wordpress.org/Plugin_API
    http://codex.wordpress.org/Plugin_API/Action_Reference
    http://codex.wordpress.org/Plugin_API/Filter_Reference

    See the info on adding actions, you'll specifically want to hook an ation onto wp_meta to output additional meta tags.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.