Adding a PHP content variable from the WYSIWYG editor? (2 posts)

  1. bennywp
    Posted 3 years ago #

    Hi everyone,

    I was wondering if it was possible for a WordPress back end user to input some sort of basic content within a WYSIWYG editor when editing pages that could be used within the page template in a predefined section that is separate from the main page content (almost like a sub-page, but not quite what I need).

    For example, say I have a page with some content, and the user puts in a smart code (eg. [miscinfo]test[/miscinfo]). In the PHP files, whatever HTML is inserted between those tags is saved in a PHP variable that can be used in a separate DIV that is completely removed from the main page content.

    Is this possible? Any help would be appreciated, thanks.

  2. wpismypuppet
    Posted 3 years ago #

    You are looking to either use a custom field:


    Or you are looking for creating your own shortcodes:


    Not sure which would be easier/best in your case, but since you mentioned shortcode tags in your post, I'm guessing that's the way you want to start.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.