WordPress homepage shows default theme after migration – logged-out users see different content

The Theme setting issue after migration. Here are a few steps you can follow: This issue is WordPress side if migrated WordPress theme and settings are removed or reset. Homepage Settings: Go to Settings → Reading in the WordPress dashboard and ensure that your homepage is set to display a specific page or the latest … Read more

How to correctly edit permalink structures for both default and custom posts/taxonomies?

With @Caleb‘s help we’ve sorted this. The main problem was that the rewrite parameter on the custom taxonomies was not set to false. Doing this removed /articles/ from the permalinks to these archives. We changed this: $rewrite = isset( $taxonomy[‘rewrite’] ) ? $taxonomy[‘rewrite’] : array( ‘slug’ => $taxonomy[‘slug’] ); $hierarchical = isset( $taxonomy[‘hierarchical’] ) ? … Read more

Changing the URL slug causes redirecting to homepage, or showing 404 or missing lang_code issue

This is not a solution, but this works some of the times. Try changing each and every relevant settings there is. Since we changed the permalink structure to ‘custom permalink’ the issue has been gone. We were hesitant to change the permalink settings at first because that had caused all our global_colours to ‘invalid’. However, … Read more

WordPress per ACF – permalink is not working

get_the_permalink() returns the permalink as a string and doesn’t echo it. You either need to echo this yourself <?php echo get_the_permalink(); ?> as you’ve got in some of your other <?php tags, or you can use the helper function the_permalink() which does echo <?php the_permalink(); ?> the same pattern as you’ve used for the_title(). Note … Read more

Get Page URl when changing slug and permalink

Instead of hardcoding the slug, instead store the ID in an option and then use it to call get_permalink(). You can also avoid hardcoding the $baseUrl and rely on a nav menu or button block instead so that it automatically updates. For example, $page_id = …..; // maybe a `get_option` call or something else? Depends … Read more

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