<?php $copyright = get_theme_mod('kotha_footer_copyright'); $allowed_tags = array( 'strong' => array(), 'a' => array( 'href' => array(), 'title' => array() ) ); echo wp_kses( $copyright, $allowed_tags ); ?>
Category: Code
SubFolder WordPress Permalink not working on Nginx?
Open your terminal and login your server.
sudo nano /etc/nginx/sites-available/example.com
add location
location /subfolder/ { try_files $uri $uri/ /subfolder/index.php?$args; }
and restart nginx
sudo service nginx restart
Create a MySQL Database and User with terminal
Login mysql
mysql -u root -p
Create Database name. Example database name: wordpress
CREATE DATABASE wordpress;
Create username. Example username: wordpressuser and Password: password Continue Reading
How to install PHP Mailer in DigitalOcean
1) If Sendmail isn’t installed, install it:
apt-get install sendmail
2) Configure hosts file correctly:
nano /etc/hosts
And make sure the line looks like this: Continue Reading
How to limit letter of WordPress post title
How to limit letter of WordPress post title? Just replace this code
<?php the_title(); ?>
with the following code.
<?php if (strlen($post->post_title) > 35) { echo substr(the_title($before = '', $after = '', FALSE), 0, 35) . '...'; } else { the_title(); } ?>
This code is very helpful to limit WordPress post title.