Support » Plugin: Portfolio Slideshow » [Plugin: Portfolio Slideshow] Bypassing short codes… embedding directly into single.php

  • Resolved Hotcoffee


    If I wanted to avoid having to enter the short code in onto each post to display the images/slideshow by editing my single.php file what code would I need to add? Thanks for any suggestions.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Dalton Rooney


    You need to use the do_shortcode function. Something like this:

    <?php do_shortcode('[portfolio_slideshow]');?>

    Thanks for the quick reply…

    I was also having problems getting the slideshow to actually slide… I removed all of the other plug-ins that were using jquery and it still didn’t want to slide… I uploaded three new picture is specifically into that post and when I viewed the source code the images were there along with the Google hosted jquery script. I couldn’t get it running so I switched to

    It is sliding correctly.

    Thank you for the short code function tip… I’m sure I will make use of that somewhere else.

    Plugin Contributor Dalton Rooney


    I saw a problem recently where the Cycle portion of the plugin wasn’t loading properly. (The plugin requires both jQuery and the jQuery Cycle plugin to work). It was because their theme did not have <?php wp_footer() ?> in the footer, which is where the cycle script is placed.

    If you still want to run the plugin, check your theme for this line. It’s very important and should be in every theme.

    I was just doing the same thing. Just a heads up that do_shortcode returns the output but DOESN’T display it. So you need to use:

    <?php echo do_shortcode('[portfolio_gallery]');?>

    Another tip that might come in useful. If you want to display portfolio galleries on pages or posts via template tags, try using a Custom Field. For example, add a custom field called Portfolio and for value put [portfolio_gallery].

    On the page template, add the following :

    $portfolio = get_post_meta($post->ID, 'Portfolio', 'true');
    echo do_shortcode($portfolio);

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Portfolio Slideshow] Bypassing short codes… embedding directly into single.php’ is closed to new replies.