• I am trying to call in a carousl. I saved it on its own php file. and am trying to call it in custom page by using

    <?php include(ABSPATH . 'carousel.php'); ?>
    Not working. Could someone please advs I also tried
    <?php include(STYLESHEETPATH.'carousel.php');?>
    And that did not work either.
    thank you
    dlm

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is the carousel.php file in your theme directory? If not move it there and then you can use:

    <?php get_template_part('carousel'); ?>

    If carousel.php is in the template folder you could try

    <?php include(get_template_directory() . ‘/carousel.php’); ?>

    or perhaps get_stylesheet_directory() depending on where your file is located. More info about that here: http://codex.wordpress.org/Function_Reference/get_template_directory

    Based on what i’ve read, STYLESHEETPATH and ABSPATH are deprecated so it’s not recommended to use them or their counterparts, Ref: https://core.trac.wordpress.org/ticket/18298

    Edit: Also +1 for KostasNi’s solution

    Thread Starter agileArt

    (@pdxdaniela)

    Hey guys. thank you. You were also right I found and used
    <?php get_template_part(‘carousel’, ‘page’); ?>
    And it worked.

    Thank you for letting me know about the deprecation!
    You all have a good weekend
    D

    ps
    if you know of a good link for styling the navbar w/bootsrap let me know please!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘including a carousel’ is closed to new replies.