Forums

[resolved] Using php in posts? (4 posts)

  1. caemusic
    Member
    Posted 9 months ago #

    It is possible to use php in posts?

    To be specific, I'm trying to display content conditionally based on whether the user is logged in (logged in users see supplementary material, unlike protection that hides the whole post). If there is a better way of doing this than including php in posts, please enlighten me!

    Thanks!

  2. Dwords
    Member
    Posted 9 months ago #

    There might be a plugin that does what you want using shortcode [hide-this] something like this [/hide-this]

    But I don't know the name of that plugin, if it exists.

    If you want to run PHP inside a Post, I think you need to install a plugin like Run PHP,
    http://wordpress.org/extend/plugins/runphp/

  3. caemusic
    Member
    Posted 9 months ago #

    I figured it out, the checkbox was in a different place on the option panel. Contrary to the Install instructions, the admin does not have this enabled by default in 2.7.

  4. caemusic
    Member
    Posted 9 months ago #

    Sorry posted that in the wrong place. runphp worked. Great success!

Reply

You must log in to post.

About this Topic

Tags