Recently, I had to change the value of max_input_vars in php settings due to a requirement from a WordPress plugin. My site is running on EC2 server, installed by bitnami. Followed by the instructions, I went to /opt/bitnami/php/etc and edit the file php.ini.
I successfully located the line max_input_vars. Sure enough, that line was commented so the settings take its default value, 1000. I uncommented that line and set the limit to 3000.
Finally, I saved the file and restart apache.
However, still no luck. I tried to find other places where this settings could be set. After a while, I couldn’t find any other places.
What is the solution?
The solution is to run this script:
sudo /opt/bitnami/ctlscript.sh restart php-fpm
And you can guess, the limit was increased.
Conclusion
It seems that when you make changes in php.ini, you need to restart php-fpm, not apache. The system I’m working on, as mentioned at the beginning of the post, is EC2 and managed by bitnami.
The scroll to top button is not something you are unfamiliar with. There are many websites use that feature. WordPress’ themes tend to support that feature out of the box too. My theme has a button to scroll to the top of the page when I’m reading a long post too. However, the button is not what I like. I could go and modify the code to change the button but that would be very time consuming and it’s not the best practice. So, I decided to make a plugin that enables users to add a Scroll to top button to their site.
What’s the difference between this plugin and other plugin? You may ask. Well, the difference is you can fully customize the button as you like. You can change the image, make it hidden on mobile devices (if you like). You can also change the width, height, padding and the position of the button on the screen.
Sounds good? Let’s meet the plugin.
How to use the Ultimate Scroll to Top button
So, the plugin only has one screen for all of its settings. Here are all of them:
As you can see, you can set the button’s width and height in many different units. You can use pixel, em, rem, %… I would recommend you use a square ratio (1:1). However, if you find a different ratio works for you, don’t hesitate.
The padding box allows you to enter the padding value of the icon. This is the padding for all sides. You can specify the value in px, rem, % just like width and height. However, make sure you enter the unit along with the number. For example 4em, 5%…
There are two possible positions for the scroll to top icon. They are bottom left and bottom right. I hardly imagine a scroll to top button stays at the top of the page. However, you can correct me and I’ll add more positions for you.
Now, the most important part of the plugin is the content of the button. As you can see, you can set the content of the icon with a full-featured text editor. Here, you can put whatever you want: text, image or even videos. However, I would recommend you use png images. There are plenty of up arrow, scroll to top button on the internet. One place I usually go to get the icon is flaticon.com. They have many good icons you can use for the scroll to top button.
After that, you can click on save changes and see the scroll to top button appears on your site.
If you need video instructions, here it is:
Conclusion
It’s a plugin I made because I find the scroll to top button should be flexible. There are room for improvements, of course. If you have any question and suggestions, please let me know.
Admin bar is a a section stays at the top of your page that lets you quickly access your admin dashboard. It also allows you to access features such as create new page, post… However, sometime it gets in the way. For example, it makes the website look different for logged in and non logged in users. With the current version of WordPress, hiding the admin bar is extremely easy.
How To Hide WordPress Blog’s Admin Bar Using Customized CSS
In order to hide the bar when you view the frontend of your site, simply go to Appearance->Customize:
You will see a screen somewhat similar to this one:
I said somewhat similar because some themes may have more options, some may have less. However, with modern themes, you should see there is a section called Additional CSS. In my case, it stays at the bottom of the panel. Let’s click on that. You will see a new panel appears as below:
If you view your page now, you should see the admin bar disappear.
How does the code snippet work?
If you know CSS, the code above is very simple to understand. The first rule applies to a div with the id #wpadminbar. That’s the admin bar you see on the front end (and also, in your dashboard). The display: none rule makes sure that the admin bar will not display.
The second rule is to remove the margin-top of html document. By default, the html element has a 32px margin-top (set by WordPress). Setting the margin to 0 makes the gap between your site and your browser’s viewport disappear.
Here is the result:
If you want to make the bar appear again, simply remove that code snippet in your Customize CSS box.
That’s how you can hide the admin bar in WordPress. I hope the post is helpful to you.
Having visitors participate eagerly in the comment section is one of the most rewarding experience of any blog owners. However, the truth is many times visitors come and leave comment and never comeback. The reason mainly because they forget about the posts they left comments on. So, it would be great if there is a tool to remind them about the conversation they participated when there are new content added to the discussion. Fortunately, there is a plugin does exactly that for you.
How to get your reader subscribe to a post’s discussion using Subscribe to Comments Reloaded
We are going to install a plugin called Subscribe to Comments Reloaded, which you can download from here
After installing and activating the plugin, when you go to a single post on your site (make sure you are not logged in as admin), you will see there is a checkbox under the comment section:
If that’s all you need, you can stop here. Now, if your visitors check that checkbox and post their comment, they will net notified when there is new comment to the post.
However, if you want to fine tune reader’s experience, let’s go to the settings:
There are plenty of options which I’m not going to cover all of them here. However, here are the most important sections:
Comment Form:
Here you can set the text appear on the checkbox, whether to show the checkbox or not, whether to check the checkbox by default or not…
The plugin author did a great job on the management page so I think it’s best to leave it as it is. However, if you want to modify some wordings, feel free to customize the text here.
Now, there is another important tab, that is the Notification tab. This tab allows you to edit the notification email you send to the subscribers:
Here, you can set the Sender name. By default, it’s your blog’s name. If you want to change this anything you want. However, leave it as your blog’s name will help the subscribers know exactly who is sending the email.
The sender email address is what will display on the sender field of the email. As you can see in the screenshot below from Gmail:
The reply to, if set is the email will receive the reply from your subscribe when they decide to reply to the notification. However, since it’s just a notification, there isn’t a need to get reply. Thus, you can leave this field blank.
In the email content, you can customize it with some placeholders as listed here:
All the placeholders have very clear names, thus, there is no explanation needed.
Conclusion
As you can see, this tool lets your visitors subscribe to the posts they leave comment on (then can also subscribe to the comments without commenting) which increase the likely that they will comeback to visit that post. It’s a win-win situation for you and your reader. The number of options you can customize is just huge. The plugin’s developer has done a great job with this one.
Featured images are becoming the must-have element of every blog posts. They makes the post listings look prettier and, if you set them right, they may tell your blog visitors something about the posts. There are times you publish a post without a featured image. It’s because you forget or you haven’t found an appropriate featured image for that post yet. Whatever the reason, if one of your post doesn’t have the feature image while other do, it will make the listing look less attractive. The solution is to set a default featured image for all posts. If you have a featured image for your post, then the default featured image will not show. However, in case you don’t set, your post will have the default featured image as its featured image.
How to set default featured image to your posts
We are going to use a plugin called Default Featured Image which you can download here.
The plugin is actually very simple and easy to use. After installing, you can find the plugin’s option page at Settings->Media:
After clicking on that, you will see a panel to set the options for your default featured image:
You can see that the settings are very self-explanatory and need little further instructions. Here, you can set the size of the featured images from Thumbnail size (smallest) to Large size. In the screen, the image’s aspect ratio is 1:1. However, your image may have different aspect ratio. You need to set the size according to the image’s aspect ratio to avoid distortion.
At the number 4, you can click on the “Select default featured image” to set the image you want to use as featured image.
The last checkbox should be checked to keep your file organized.
Finally, click on Save changes. Now, every posts without featured image will use this image instead.
Conclusion
I personally thing this plugin is a simple, yet powerful and useful. If I develop something similar, I would add the option to set default image for WooCommerce product too. However, this plugin is completely free and does its job brilliantly, there is nothing more I can ask.
Are you a dev? Checkout programming tutorials here: datmt.com
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.