ammejohn10;11048079 wrote:Am trying to add layer slider in a single page but am facing some coding error. Can any one help me?
Considering you aren't telling us what the error is, I'd lean towards saying "no", notwithstanding you got lucky and someone appears to know your context better than some of the rest of us might.
This is my code which use to adding slider:
<p><div id="areaslider"><?= do_shortcode('[layerslider id="6"]'); ?></div></p>
</div>
There's no PHP function called do_shortcode() ... so that could be the source of the error, except, as cluelessPHP points out, that's a WordPress function.
OK, so now we have some context ... my next question would be, does your server/installation of PHP support short_open_tags?
Because short_open_tags are quite deprecated and might be causing errors also ... but, again, you don't tell us what errors you're receiving. We are programmers and such, not mind-readers 😉
Perhaps you should read [thread=10240608]Debugging 101[/thread]?