WordPress admin page not found error

If you don’t have database access for some reason, you can also use // use these in your wp-config.php define( ‘WP_HOME’, ‘http://example.com’ ); define( ‘WP_SITEURL’, ‘http://example.com’ ); or // use these in your functions.php update_option( ‘siteurl’, ‘http://example.com’ ); update_option( ‘home’, ‘http://example.com’ ); to regain access to your site. You can read more about changing the … Read more

wordpress copyright dynamic

The fastest way is to look for the current copyright text inside your theme’s footer.php file and substitute it with something more of your liking. My suggestion, as I don’t know what you mean for “dynamic”, is to substitute the current text with a function call, like <?php my_copyright_text() ?>, and then define that function … Read more

Custom HTML title based on URL parameter

Another approach that may be a bit more opaque to your users is to look at the referrer_url. This is a server-level variable that, while not 100% reliable, is generally a good indicator of where someone was when they clicked your link. It would not work if someone copied the link and sent it to … Read more

correctness of URL

See the accepted answer to this question: https://webmasters.stackexchange.com/questions/81252/is-a-trailing-slash-appropriate-before-url-parameters tl;dr Either way is correct, but consistency in the result is the key to best SEO practices, because with/without is a different URL. If you don’t want the trailing slash (or you do), you can change it in your Admin, Permalinks screen.

Two URLs of one post is available

In this case you want to set a canonical URL to tell search engines that the content is duplicated over more than one URL. The canonical URL is a <link> tag which appears in the <head> of your page, for example: <link rel=”canonical” href=”https://example.com/Tourism/astara/museum-customs-home-belgians” /> You want to use this same URL for each of … Read more

Is there a way to test if a URL is part of the current blog?

One option could be to use url_to_postid( $url ), which returns a “ID of the post or page that resides at the given URL, or 0 on failure.“, https://codex.wordpress.org/Function_Reference/url_to_postid But this doesn’t work with archives, I think. To find out if the url is for an archive, you’d probably need to explode() the path and … Read more

sub menu link is not working

This Code worked for me while ( odrin_have_rows(‘read_the_book_chapters’, $post_id) ) : the_row(); if (odrin_get_sub_field(‘sub’)){ $output .= ‘<li><ul>’; } $output .= ‘<li><a href=”#item’. $item_num = 1 . ‘”>’ . odrin_get_sub_field(‘title’, $post_id) .'</a></li>’;if (odrin_get_sub_field(‘sub’)){ $output .= ‘</ul></li>’;}$item_num++; endwhile; I was missing <li> of sub menu. Meaning that <ul> of sub menu should be within <li> of parent. … Read more

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