wp_trim_words() does not trim the_content() in WordPress

The problem lies in this line: <?php echo wp_trim_words( the_content(), 55, $moreLink); ?> You call the_content function in there. This function prints all the content and doesn’t return anything. It means that you print the content, and then pass an empty string to the wp_trim_words. It should be: <?php echo wp_trim_words( get_the_content(), 55, $moreLink); ?> … Read more

How to redirect WordPress home page to custom static HTML page

This code may help resolve the issue for this particular situation. Put this code in yor theme’s functions.php. add_action(‘template_redirect’, ‘default_page’); function default_page(){ if(is_home() or is_front_page()){ exit( wp_redirect(“http://path/to/your/html/file”)); } } Replace http://path/to/your/html/file to exact url of html file. I hope this helps.

What is true chmod for WordPress?

All files should be writable only by your user account. So the correct permissions for files and directories are: Directories: 755 Files: 644 You may want to secure some files: wp-config.php: for maximum security, this file should be made writable by your user only or its group. This means 400 or 440 permission .htaccess: 666 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)