• Resolved fstopjunkie

    (@fstopjunkie)


    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!

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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.

    Thread Starter fstopjunkie

    (@fstopjunkie)

    The above statement was enclosed within the php marks…

    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).

    Thread Starter fstopjunkie

    (@fstopjunkie)

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

    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.

    > 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.

    Thread Starter fstopjunkie

    (@fstopjunkie)

    Damn… Back to the drawing board then. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Calling a plugin within a PHP page *New to WP!*’ is closed to new replies.