Code Snippets

Category

15 posts found

31 Mar 2019
1.27K
No Comments

I’ve wrote add_subdomain_in_url function and it will help you in easily add sub domain in url by passing in parameters and look output result

Post in

17 Mar 2019
3.09K
No Comments

New version 7.2 of PHP is little bit restrict for calling functions and passing parameters, now count() function will only count variable and it will thrown an error when parameter is not array. Here is quick fix I have create my own function for counting array or object and it

Post in

10 Jul 2018
0.5K
No Comments

I need that function to delete 10 minutes old files from my project, remove_x_minutes_old_files function required two parameters $path for directory path and $in_minutes for minutes how much old file you want to delete

Post in

29 Dec 2017
0.74K
No Comments

This function I was made specially for my theme which is running in this blog. I made function because Gravatar generate random images on each user’s avatar if user not uploaded real image, this function will not work no localhost so please use domain path eg: domain.com/wp-content/themes/mytheme/images/DefaultAvatar.jpg

Post in

29 Nov 2017
0.6K
No Comments

In Current 4.9 or preview versions we cannot get the_excerpt or get_the_excerpt by post ID so here is a little bit hack code to get excerpt paragraph of post by postID with alternate code

Post in

23 Mar 2017
0.25K
No Comments

Post in