How to change PHP version in cPanel

Here are the steps to change the PHP version in cPanel.

1. Log into cPanel
2. Click “MultiPHP Manager” in the Software section.
How to change PHP version in cPanel
3. Here you can select PHP version which is available on your server.
How to change PHP version in cPanel

Note that the older servers will not display various PHP versions, So in this case you need to ask Or change your hosting provider.

Custom fields option isn’t showing – WordPress

If you aren’t able to see custom field options in the backed of WordPress. So you need to click on the checkbox in “Screen Options”.

See the below screenshots as described above.

How to enable custom field options in the backend

After clicking on the checkbox you can see the custom field options in the backed of WordPress below the content editor.

Here is the screenshot for more information.

How to enable custom field options in the backend

How to Limit the Number of Archive Months Displayed in WordPress

If you want to display the number of archive months in WordPress then you just need to add the below function in functions.php file of your current active theme.

After adding the below function in functions.php use the shortcode in WordPress text editor or text widget. This will display archives list with limited months which you will set in the below function.


// Function to get archives list with limited months
function wpb_limit_archives() { 
 
$my_archives = wp_get_archives(array(
    'type'=>'monthly', 
    'limit'=>12,
    'echo'=>0
));
     
return $my_archives; 
 
} 
 
// Create a shortcode
add_shortcode('w3m_custom_archives', 'w3m_limit_archives'); 
 
// Enable shortcode execution in text widget
add_filter('widget_text', 'do_shortcode');

CSS numbering using :before

See the below example to add numbering using :before


   ul {
      counter-reset: number;
   }
   ul li {
      counter-increment: number;
   }
   ul li::before {
      content: counter(number)" ";
   }



<ul>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
  <li>List item<li>
</ul>


Example:

  • List item
  • List item
  • List item
  • List item
  • List item