When we develop any custom WordPress theme we need to use different functions. We need to write those functions in functions.php file of the custom theme. I have prepared some of those basic functions and included in the functions.php file. I have mentioned the usage / procedure to use the function in the same file.
You have to download the functions.php file and put it inside your theme folder.
Following functions are included in functions.php file.
- Navigation / Menu
- Remove default UL markup from wp_nav_menu output
- Enable featured image with custom dimension
- Image compression while uploading
- Remove width and height attributes from inserted images
- Enable sidebar widget
- Shorten post / page title by word limit
- Shorten excerpt by word limit
- Shorten content by word limit
- Strip images from content
- Display the content of a page by page ID
- Display the content of a page by page slug
- Anti spam email shortcode inside content editor
- Change default sender email address for generated emails
- Change default sender name for generated emails
- Remove default widgets
- Remove WordPress version from Head
- Remove login error message on login page
- Enqueue script in footer
- Enqueue CSS in header
- Disable admin bar for all users but admins in the front end
GitHub URL: https://github.com/blbwd/wp-functions
74,652,825 websites depend on WordPress and yet yours was the one that got hacked? Well, join the club, you’re not alone!
WordPress is a phenomenally popular site that powers about 30% of the internet. I have also been a constant victim of getting my WordPress site hacked frequently and decided to take action needed to stop this once and for all. Here is how I found a solution to my hacking woes.
While browsing the internet for the best security plugin by WordPress out there I came across MalCare. This was a relatively new security feature that I became even more convinced of as I learned more about it. And let me tell you, I went for it, and since then, my site hasn’t been hacked to date.
WordPress migration is the bare necessity of running an active website. All WordPress customers need to deal with the aggravations with migrating their site beginning with one web host onto the next web host.
It is known by the web society that WordPress migration is a overwhelming undertaking. This is clear with the by and large wide number of instructional exercises and articles concerning it. Even more importantly, the expenses incurred in this system are a wide sum.
In the 21st century, we would look for our prerequisites to be fulfilled intuitively for a comprehensive customer endeavour. For the particular strategies to stay reasonable to this day and age, it is fundamental for the required virtual processes to be quick, i.e. they ought to be simple for the customer.
WordPress has profitable strength of 14 years on the web. Even so, after this time, migration must be done manually. This is genuinely tiresome. You will be responsible for content creation and administration; additionally, even back-end work like migration for your website has to be done by you here.
WooCommerce is the most customizable eCommerce platform for building your online business. If you opt your website under WordPress then WooCoomerce is the right choice. But every WordPress themes are not properly compatible to this plugin. While choosing your theme you might consider if the theme is WooCommerce ready or not if you are going to sell products through your site.
While developing WordPress theme or plugin we use different WordPress keywords or terms, additionally while handling forms fields and custom post types we have to consider what names we can use or not. The restricted names are called reserved terms.
WordPress itself reserves few keywords or terms which we can not use in our coding. Using these reserved or restricted terms just break the functionality what we intend to get.
From personal blog, travel blog to company web page, we need to embed Google Map to show proper location. There are few WordPress plugins available to serve the same feature. But I always intend to not using WordPress plugins if it can be served by writing code.
We can create a simple WordPress shortcode to enable Google Map embed feature inside post or page.
You run your personal blog or website on WordPress or you are a developer maintaining lots of websites on WordPress. Taking your website backup regularly is the primary process you have to do for security purposes so that for any unforeseen situation you never lost your website files or data.
Manual backup process using FTP & PHPMyAdmin is the most traditional way but it always needs keep tracking when you need and moreover you have to bit technical about your site file system and database.
The benefits of using automatic backup system: