Tag Info

New answers tagged

1

I guess you are talking about a specific page, for example domain.com/page? So you can create a generic page template (and select it for the page in WordPress admin panel) or create a template for the specific page. See instructions here. In this template you can add your php code for the redirect. If this redirection would be done for the whole site, not ...


1

You need to wrap the first three || conditions in additional parentheses so they are evaluated first BEFORE the last && condition: Psuedocode example: here here ↓ ↓ if ( (condition || condtion || condition) && ! condition ) { //do business logic... } This now ...


0

It's simply not possible, so here is the work around I come up with public function redirect($url = false) { if(headers_sent()) { $destination = ($url == false ? 'location.reload();' : 'window.location.href="' . $url . '";'); echo die('<script>' . $destination . '</script>'); } else { $destination = ...



Top 50 recent answers are included