Running non-WordPress PHP files

To run non-WordPress PHP files in a subfolder alongside a WordPress installation, follow these steps to modify your .htaccess file: Choose a Subfolder Name: Decide the name for your subfolder, e.g., mycustomphp. Modify the .htaccess File: Add the following lines above the # BEGIN WordPress section to exclude your subfolder from WordPress’s URL rewriting: RewriteEngine … Read more

Make category page the wordpress homepage (not blog)

This happens because WordPress doesn’t have provide multi-lingual functionality by default. When you call get_category_link( 22 ), you’ll get exactly that – the link for category with the ID of 22. WordPress isn’t aware that there might be a translation for the term and it should be used instead. The multi-lingual support needs to come … Read more

WordPress post slug redirection

You can use the next PHP code: // NAV: Custom Redirect function wpcoder_custom_redirect() { // Check if the current URL is the one you want to redirect if (is_single() && is_main_query() && get_post_field(‘post_name’) === ‘news-from-new-york’) { // Define the new URL $new_url = home_url(‘/news-from-new-york-2/’); // Get the query string from the current URL $query_string = … Read more

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