WordPress.org

Forums

do_shortcode HELP (7 posts)

  1. ManuelGarciaPH
    Member
    Posted 1 year ago #

    Hello,

    I've been trying to automatically post all the slideshow in my post. I usually add [slideshow post_id="POST ID OF MY POST"] to each one of my post to do the job but I think there' a better way by incorporating it inside the theme.

    I tried to add something like this in my single.php:

    <?php
    		$postid = get_the_ID();
    		echo do_shortcode('[slideshow post_id='.$postid.']'); ?>

    Any help?

  2. graphical_force
    Member
    Posted 1 year ago #

    What happens when you run that code? Do you get an error?

  3. ManuelGarciaPH
    Member
    Posted 1 year ago #

    Nothings shows :( It's a blank page.

  4. What plugin are you using? What theme are you doing this to?

  5. catacaustic
    very awesome
    Posted 1 year ago #

    If you're getting blank pages like that, it means that there's some error somewhere in your coding.

    In your wp-config.php file, change this value to true:

    define('WP_DEBUG', true);

    Taht will let you see the error messages, and see what the error is and where it is. You can also get this info form your servers error logs, so that's anohter option.

    That's all there is to it. Find out what the error actually is and where it's occuring, and you'll be able to fix it.

  6. ManuelGarciaPH
    Member
    Posted 1 year ago #

    Hello, I'm using a custom theme and a slideshow plugin. Is there any problem with the syntax?

  7. catacaustic
    very awesome
    Posted 1 year ago #

    The syntax looks OK, but did you do what I suggested above? That's the only way that you're going to find the error. You need to do some debugging of your own to find out what the actual problem is.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags