Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Import wordpress functions in custom.php file

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 335
    Comment on it

    Hello reader's in this blog I will guide you how to import "Wordpress functions in custom.php file?".

    First Create a custom.php file into your theme and put your code into it. Below is the example of image crop function into custom.php :

    <?php
        add_action( 'after_setup_theme', 'setup' );
        function setup()
        {
            add_image_size( 'banner_img', 1920, 418, true );
            add_image_size( 'gallery_img', 500, 300, true );    
        }
    ?>
    

    In next step open function.php file and include custom.php file into it. Below code defines how to include file:

    include_once('custom.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: