Add the code in “functions.php” file.
This section is your main reference for learning all the exciting and interesting things that are available in WordPress templates and themes. This section is the complete source for all the content related to coding and WordPress development.
Open “functions.php” of your theme and write below code.
open “functions.php” file and write the below code in it.
One of the methods of designing WordPress themes is to use Bootstrap in the WordPress theme. But adding Bootstrap to the WordPress website template and menu has its own challenges, and we will discuss how to add Bootstrap 4 and 5 to the WordPress theme step by step in this tutorial. Today, the first thing …
Use following code to check if specific plugin is active or not in WordPress Theme. For example, to check if One Click Demo Import activation.
Most of the times, you redirected to welcome page after activation of theme. If you want to use this trick in your theme, add below code in functions.php file of your theme. The “hs_welcome” is custom admin page (The “Welcome” page).
To add related posts to your theme, open functions.php file and add the following code. Go to your posts display loop and add the function in it.
WordPress has default size for post author avatar. If you increase or decrease the size, use following code. Go to place that you want to display the avatar. Above code tells WordPress that, display author avatar image with 100px width and height.
Post thumbnail sometimes will be real problem for the design. If you are WordPress theme developer, you know what I mean. You can’t force the theme user to adjust post thumbnail with Photoshop or other photo editors. How To Adjust Thumbnail With Custom Size? If you want to crop the thumbnail in theme, do the …