Articles of redirect

Redirect non-admin users away from wp-admin/index.php (main dashboard page) to wp-admin/profile.php

I’ve set it so non-admin user can’t see the “Dashboard” link or can’t have access to the main “wp-admin/index.php” page. I’ve also added a plugin that restrict non-admin users from creating a new page. Whenever a non-admin users try to add a new page, they’ll be accidentally redirected to “wp-admin/index.php?permissions_error=true“, which is the main “wp-admin/index.php“, […]

Masking Affiliate URL using $post_slug after “/go/”

I am trying to figure out how can I redirect a masked URL based on a custom field URL. If I have a masked URL: echo ‘<a href=”https://domain.com/go/’. $post_slug .’/” class=”button”>Click here to save ‘ . $discount_percentage . ‘% on ‘ . $title . ‘</a>’; Then how can I redirect this URL https://example.com/go/wordpress to a […]

Have functions work outside the loop with 404 override

I need to override the 404 code for a very specific scenario and it’s not yet fully working. I am linking day archives with rel=prev/next, and the chain is supposed to be intact start-to-end. For this reason, at least one post needs to be published everyday, best right at midnight. This should not be a […]

How to set up a single portfolio page as home page?

I would like to have a single portfolio page set up as wordpress homepage at my domain www.syin.eu, using Valeria theme (biobutterfly.com/valeria/) To achieve this, what I did is to redirect the homepage directly to where the single portfolio resides. So I added this piece of code to Home Page Templage (homepage.php) $location = get_site_url() […]

Mixed Content with SSL, wordpress behind a reverse proxy

I ran into mixed content with SSL issues. I’ve applied for Let’s encrypt SSL certificate for my test wordpress site behind a reverse proxy(articaproxy). The same SSL certificate has been deployed in reverse proxy server and wordpress virtual host. The reverse proxy http/https redirect works fine. I forced the siteurl and home url to https […]

htaccess redirects and WordPress

I am migrating from an ancient static web site to WordPress. In the old site, I used htaccess and RewriteRule to simplify URLs and mask the underlying parms. One case was: RewriteRule ^definition/([^/]+) /display-definition?word=$1 [NC] This allowed people to specify a URL of: domain.com/definition/love And under the sheets executed instead: domain.com/display-definition?word=love I have created and […]

Admin page redirect to another admin page

How can I redirect certain WordPress admin pages to another admin page. For example I never want a user to see wp-admin/about.php it should always redirect to wp-admin/index.php. There are also a couple plugins that redirect to a plugin welcome page with promotions the I want to be able to check if this URL then […]

Change Dashboard url

How can I change the link to the Dashboard of my WordPress installation from www.mysite.com/wp-admin to www.mysite.com/custom-name, without making use of any third party plugin? I already know that simply changing the wp-admin folder name will not help.

Redirect loop after changing nameserver

my site is https://techyuga.com. Yesterday, I tried to change the nameserver to CloudFlare nameserver. But after that,I am getting infinite redirect loop on my website and I can’t even log in to my WordPress dashboard. However, when I changed the nameserver to my host default nameserver again. It works absolutely fine. Could anybody help? It’s […]

Change template dynamically

Is it possible to change the template loaded for a page, as it loads, without having to change the record in the database? I suspect it can be done with the template_redirect action, and the will probably have something to do with the template-loader.php file in the WP core, but I can’t figure it out. […]