I'm on version 4.6.11 of the CiviCRM plugin for WordPress, WP version 4.4.1.
I expect this has something to do with shortcodes, hijacking, and maybe some other things related that I'm having trouble understanding. Here's what's happening:
I have created a WP page template called page-civiform.php. It is intended to be used by site admins to create event registration pages and donate pages, and it has some custom fields and specific styling/branding. Admins use the main content WYSIWYG editor to paste a shortcode from CiviCRM that creates their event registration form or donate form. All is well, and these pages look good.
Then, once a user registers or donates, the URL of the very page is appended with a query string, and it appears to be retrieving the default page.php sidebar (which is called in page.php). BUT, the body classes are not those of page.php. Instead, the body classes are exactly the same as those of the previous page where the shortcode was pasted - that page which is using page-civiform.php template. That's a problem, because it ends up creating an unprofessional appearance with a wonky layout.
I created a page with slug 'civicrm' and in WordPress Base Page setting, it is set to use that page, which does indeed use page.php as its template. On top of that, per the answer here, I put a filter into functions.php file to specify using page.php. None of this appears to have any effect. Removing that filter and changing the WordPress Base Page (to anything else) also appears to have no effect.
Seems the wires are crossed here. I did see this issue, discussion of which sounds unpromising.
I need the Civi-generated pages to be style-able differently from the pages where shortcodes are pasted; I can't do that when the selectors are identical.
Could this issue be related? Is there a setting somewhere that I am unaware of?
get_sidebar()
? If so, how are you conditionally hiding it? – Christian Wach Jan 27 '16 at 15:02get_sidebar()
call. Here is a link to a gist of it: page-civiform.php. – susan langenes Jan 28 '16 at 5:38