Resolve 404 on posts without category

Ok, resolved it in 404.php <?php $klo_link = $_SERVER[‘REQUEST_URI’]; if (preg_match(“/^\/[a-zA-Z0-9\-\_]+\/$/”, $klo_link)) { //echo “A match was found. \n”; //echo $klo_link; header(“HTTP/1.1 301 Moved Permanently”); header(“Location: “.get_bloginfo(‘url’).”/a”.$klo_link); exit(); }else { get_header(); } Put that at the beginning of the 404.ph

Changing permalinks structure without loosing SEO

You don’t need a plugin to achieve your goal. Use server redirect in the .htaccess file because it will not load the processor to interpret the WordPress PHP code and will not consume time. The redirect will be completed before the WordPress runs. RewriteRule ^[0-9]+/[0-9]+/(.*)\.html$ /$1 [R=301,L] Where [0-9]+/ is the numeric year and month … Read more

WordPress permlink is not working

Have you tried to save the permalinks again? Step 1: In the main menu find “Settings > Permalinks”. Step 2: Scroll down if needed and click “Save Changes”. Step 3: Rewrite rules and permalinks are flushed.

New custom PHP pages are getting 404s

Per the Template Hierarchy, creating the file page-tacos.php in your active theme will create the template that would be used to view the page with slug tacos, but it doesn’t create the page. You also need to add the page in WordPress’s backend.

Make last three words of excerpt a link

There are different filters for the more-link, depending on whether you want it at the end of the_content or the_excerpt. Ultimately both work the same though. Selecting the last three words is a matter of PHP-skills. Like this: add_filter (‘the_content_more_link’,’wpse339250_three_words’,10,2); function wpse339250_three_words ($more_link, $more_link_text) { $excerpt = get_the_excerpt(); // split the excerpt in array of … Read more

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