return page name in url

To display title of current page you use the_title() template tag. Related and slightly more specific functions are: get_the_title() that returns title without echoing and can retrieve title of another page/post, given its ID as input; the_title_attribute() that returns a little more cleaned up version (safer to use in link titles without breaking markup and … Read more

Post with no tag permalink problem

I don’t think there is an easy way to solve this, because /some-category/some-tag/ will be used as an overview page for all posts in category some-category and with tag some-tag. If an URL like /cocktails/bloody-mary/ comes in for a post with the name bloody-mary, category cocktails and no tags, WordPress can’t split it up correctly … Read more

Block registration by URL referrer?

You can use “register_post” hook that happens just before the user is saved to the database or you can use “register_form” hook and check the referring URL for a match and die();

title tag function

function title_tag () { // 0. uppercase string $str = strtoupper ( $_SERVER[‘REQUEST_URI’] ); // 1. remove trailing and init slash $str = trim ( $str , “https://wordpress.stackexchange.com/” ); // 2. add search and replace chars; // two array, with same element size, // 1. element of search array will be replaced // with the … Read more

WordPress blog clone.. wp-admin issue

Here’s 1 way to fix this. Add below inside Site2 wp-config.php: define(‘WP_SITEURL’, ‘http://Site2’); define(‘WP_HOME’, ‘http://Site2’); Once logged in, go to Settings > General and change WordPress address (URL), Site address (URL) to Site2. Then delete those 2 lines that you add inside wp-config.php.

WordPress permalink issue

I think the problem comes from the rewrite rules that had been saved when you developed the site locally. To fix it, you should go to Settings -> Permalinks and set the permalink structure again. Note that, you may just click on the save button, that will flush the rewrite rules for you.