WordPress.org

Support

Support » Plugins and Hacks » File Gallery » [Resolved] Error inserting shortcode in page template

[Resolved] Error inserting shortcode in page template

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Aesqe

    @aesqe

    @mgali002: that’s because the javascript and css files for the “simple” template didn’t load. You can add them manually, just paste the following code at the top of your page template, before get_header:

    <?php
    wp_enqueue_style('file_gallery_simple', FILE_GALLERY_URL . '/templates/simple/gallery.css');
    wp_enqueue_script('file_gallery_simple', FILE_GALLERY_URL . '/templates/simple/gallery.js', '', '', true);
    ?>

    that should work.

    ok Aesqe,

    thanks a lot!!!! 🙂

    When I insert the shortcode in php

    <? php echo do_shortcode (‘[gallery link = "file" template = "simple"]‘);?>

    i get blank page i have put before get_header:
    <?php
    wp_enqueue_style(‘file_gallery_simple’, FILE_GALLERY_URL . ‘/templates/simple/gallery.css’);
    wp_enqueue_script(‘file_gallery_simple’, FILE_GALLERY_URL . ‘/templates/simple/gallery.js’, ”, ”, true);
    ?>
    but still get blank page display, PLEASE HELP ME

    Plugin Author Aesqe

    @aesqe

    @gaurir: is that blank space between the “?” and “php” in your first code example also present in your file?

    <? php should be <?php

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Error inserting shortcode in page template’ is closed to new replies.
Skip to toolbar