Passing a Wordpress Variable to a Plugin Function

Discussion in 'WordPress' started by rubendn, Mar 29, 2007.

  1. #1
    I am trying to pass the title of a page to the get_flickrrss plugin.

    Here is my code:

    <?php $postname = $wp_query->post->post_title;?>
    <p align='center'><?php get_flickrrss(7, "public", $postname); ?></p>

    If I do an echo right after the first line to test, the post title is properly assigned to $postname, but when I include it in the get_flickrrss function it passes a blank value. I'm not too proficient with PHP so I'm not sure if the value has to be assigned another way to be able to pass it to the fucntion?

    Would really appreciate any help.
     
    rubendn, Mar 29, 2007 IP
  2. darkmessiah

    darkmessiah Peon

    Messages:
    500
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I know this is old and all, but here how it's done incase others need to know

    fawzma.com/2007/11/28/pass-a-php-variable-from-a-wordpress-post-to-a-wordpress-script/
     
    darkmessiah, Nov 28, 2007 IP