annalan
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
I have exactly the same problem. Been trying to disable all other plugins and switch to default 2015 theme but still land on 404 🙁
What should I ask my host to get that fixed? TIA
Forum: Plugins
In reply to: [Widget Context] [Plugin: Widget Context] Can't "target by URL"btw, big thanks to @jpmorganjr 🙂
Forum: Plugins
In reply to: [Widget Context] [Plugin: Widget Context] Can't "target by URL"weird thing, I been trying to make it work and searched for different solutions.
Finally fixed it work but changing some code in widget-context.php –
Found on http://wordpress.org/support/topic/plugin-widget-context, post by jpmorganjr:In widget-context.php change this function: function get_current_url() { if ($_SERVER['REQUEST_URI'] == '') $uri = $_SERVER['REDIRECT_URL']; else $uri = $_SERVER['REQUEST_URI']; $url = (!empty($_SERVER['HTTPS'])) ? "http://".$_SERVER['SERVER_NAME'].$uri : "http://".$_SERVER['SERVER_NAME'].$uri; if (substr($url, -1) == '/') $url = substr($url, 0, -1); return $url; } To this one: function get_current_url() { $uri = $_SERVER['REQUEST_URI']; if (substr($uri, -1) == '/') $uri = substr($uri, 0, -1); return $uri; } You won't be able to use the http or https versions of the target by URL anymore, but you shouldn't be able to anyway because all the widgets are on the same domain. If I had more time I'd do a proper debug, but I'm in a hurry and wanted to share this because it's the only plugin that offers this solution and I know plenty of others need it to work!!Then had to type */pagename (with the star before trailing slash) and it works 🙂
Viewing 3 replies - 1 through 3 (of 3 total)