Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to include file only on specific page in wordpress

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 107
    Comment on it

    Hello Friends

    This is a good practice if we include only essential files on every page like I have implemented dropbox on a particular abc page and this idle to include this file only on abc page or where it is require. Please look at the below code ::

    <?php 
    if(is_page('download-format-file'))  //is_page return true if download-format-file called on URL
    { ?>
    <link rel="stylesheet" href="<?php echo esc_url( get_template_directory_uri() ); ?>/css/dropbox.css">
    <script src="<?php echo esc_url( get_template_directory_uri() ); ?>/js/dropbox.js"></script>
    <?php } ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: