Need Help for my Custom Page Template

2019-08-09 23:19发布

问题:

I'm very new to this PHP coding.. actually I'm not a programmer, but I need this help from anyone here...

Anyway, what I need help from you:

I have written a small snippet of Custom Page template, here it is:

------------------------------

<?php
/*
Template Name: MyCustomTemplate
*/
?>

<?php get_header(); ?>

<?php get_footer(); ?>

------------------------------

Now I have installed a wordpress slider plugin "Nivo Slider"..

Now I'm not understanding how do I call this plugin into my custom template...

Iam trying to achive home page with a Slider and some ads in it.. eg: I need my home page like this: www.papayaclothing.com/shop/

So, could anyone please provide me a code to work that?

回答1:

Please try following code, make sure that slider you are trying to call is published:

<?php 

//valid for Nivo Slider version < 1.8
echo do_shortcode('[nivoslider slug="my-slider"]');

?>

Let me know if my answer was helpful.



标签: wordpress