do_shortcode for fancy images.

pending (2 posts) (2 voices)

  1. n3xn3x
    Member

    Hello, I was trying to add mini galleries to my posts by using php, outside the editing post area. Basically I am using a folder name as a custom field, in order to render all the images inside in a gallery. All fine until I put in template-full.php something like:
    <?
    echo do_shortcode('[fancy_images height=120 width=190]http://www.mysite.com/teaser/50.jpg http://www.mysite.com/teaser/50.jpg [/fancy_images');
    ?>
    How can I run this shortcode for fancy images in php?
    Any help is greately appreciated.
    Thanks

    Posted 1 year ago #
  2. Hi n3xn3x,
    you just forgot to close the last parenthesis.
    This worked for me:

    <?
    echo do_shortcode('[fancy_images height=120 width=190] http://www.mysite.com/teaser/50.jpg http://www.mysite.com/teaser/50.jpg [/fancy_images]');
    ?>
    Posted 1 year ago #

Reply

You must log in to post.

Construct WordPress Theme
Construct wordpress theme
Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme