• Is it possible to put some kind of variable in as the post_id so that it refers to whatever post the shortcode is in? I need to be able to drop a single code across many posts and have it always refer to the post where it is. Perhaps change the behavior of the default tribulant_slideshow shortcode to show attached images if there is no gallery associated with the post? Right now it just says “No slides are available” unless I hardcode the post_id

    https://ww.wp.xz.cn/plugins/slideshow-gallery/

Viewing 2 replies - 1 through 2 (of 2 total)
  • xavierve

    (@xavierve)

    Hi there, thanks for this great plugin… a very brillant idea for making things usefull

    it would be great if I could add the PHP code into single.php in order to show slideshow of current post -if it has images-

    <?php // if (function_exists('slideshow')) { slideshow($output = true, $gallery_id = false, $post_id = false, $params = array()); } ?>

    is it there a doc page for PHP ?

    thanks in advance!

    xavierve

    (@xavierve)

    Hi Pulpcovers,
    To authomatically get the slideshow of current page, if page is single page or post, just go to single.php (it depends of your theme) and ad the slideshow hardcode

    <?php
    $pid = get_the_ID();
    if (function_exists(‘slideshow’)) { slideshow(true, false, $pid, array()); } ?>

    tell me if you got it working 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘post_id as a variable?’ is closed to new replies.