jstar198
Forum Replies Created
-
Yep right at the bottom, instead of the following line:
$mappress = new mappress();
Also it might be best to rename the
$post
variable to something else like$a_page
to avoid overwriting the global$post
variable.I forgot this needs to be active on admin pages, here’s an updated version:
//MODIFICATION: only load on certain pages $allowed_pages = array('/wp-admin', '/my-page-name'); foreach ($allowed_pages as $page) { if (stripos($_SERVER['REQUEST_URI'], $page) !== false) { $mappress = new mappress(); // Create new instance of the plugin break; } }
If anyone can think up a nicer implementation please do post it.
This problem bugs me a lot also.. it’s not a problem with this plugin in particular but really with the WordPress framework.
Anyway I had your exact same issue and came up with this hack:
At the very bottom of mappress.php (in the plugin dir), put a clause similar to the following://MODIFICATION: only load on certain pages if (stripos($_SERVER['REQUEST_URI'], 'my-page-name') !== false) { // Create new instance of the plugin $mappress = new mappress(); }
Of course change
my-page-name
to the URL/partial name of your page. You can’t use post IDs or other such things at this point since we have not yet entered “the loop”.
This is just a quick & dirty hack but it does work.. ideally someday in the future this sort of thing could be properly built into WordPress.Remember that if you update the plugin you will need to re-patch mappress.php
Forum: Installing WordPress
In reply to: Widgets don’t drag and drop as advertisedWas having the problem where I couldn’t drag anything on the Admin backend.
Deactivated the “WP Shopping Cart” (E-Commerce) plugin and is back to working again. I suppose will just have to wait until they release a fixed version.
Hope this helps anyone else out there.