WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Calling a plugin within a PHP page *New to WP!* (8 posts)

  1. fstopjunkie
    Member
    Posted 6 years ago #

    Hi,

    I'm trying to create a php file which will call a new plugin (already successfully installed and activated) and pass a variable to that plug. Currently I have this statement within a file:

    echo "[exzo]" . $image_url . "[/exzo]";

    Now this appears to be generated after WP has parsed the page for plugins, and hence just appears as text. Any way to have this appear within the page as though I'd just called it within a blog post?

    Thanks!

  2. Pinoy.ca
    Member
    Posted 6 years ago #

    This reminds me of Movable Type and Livejournal, where the templates are 'parsed'....

    When you are embedding PHP statements in theme files, you must enclose them between <?php and ?> marks.

  3. fstopjunkie
    Member
    Posted 6 years ago #

    The above statement was enclosed within the php marks...

  4. Pinoy.ca
    Member
    Posted 6 years ago #

    When you say "file", is this a Theme file or on a Post or a Page? You can't embed PHP commands inside your posts.

    Added, after looking at EXZO:

    Exzo tags only work inside posts (or pages).

  5. fstopjunkie
    Member
    Posted 6 years ago #

    Sorry. This is within a php file used by the theme.

  6. Pinoy.ca
    Member
    Posted 6 years ago #

    Aha, now I understand what you're trying to do.

    Exzo tags only work on the text of posts (or of pages), not on the theme files.

  7. Pinoy.ca
    Member
    Posted 6 years ago #

    > Any way to have this appear within the page as though I'd just called it within a blog post?

    I suggest you have a peek inside the exzo plugin and see what it actually does to the imageurl. You can repeat that code directly on your theme.

    Watch out: If you decide to use a function that is defined in the exzo plugin directly in your theme, then if the exzo plugin is deactivated or uninstalled, your theme will have undefined-function PHP errors.

    If my suggestion helped, do visit my profile sometime.

  8. fstopjunkie
    Member
    Posted 6 years ago #

    Damn... Back to the drawing board then. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic