I'm trying to figure out how to properly format the following site's pages: http://marchofremembrancehouston.org/march/?page=CiviCRM&q=civicrm/event/register&reset=1&id=25
See how the CiviCRM data is pushed to the top right of the site? I would like the form to fit inside the content area of the theme.
I've already done a lot of research and no one seemed to give a clear answer.
This is a bug in CiviCRM. You're using a WordPress plugin that processes each page's content to create tags for Facebook Open Graph (to populate the blurb and image that goes on your Facebook post when you share the page). The problem is that processing the content triggers CiviCRM to run, and consequently, it prints all the content in the head of the page.
The issue describing this in a little more depth is here: https://issues.civicrm.org/jira/browse/CRM-14244
The next release of CiviCRM (4.4.5) will contain the fix, but if you're in a hurry to publish the page, here's what you can do:
Go in the files of your site to wp-content/plugins/civicrm/civicrm.php
Scroll down to line 412 or so (depending upon your version) and look for the line saying
public function invoke() {
Add the following lines below it:
if ( !in_the_loop() && !is_admin() && empty($_REQUEST['snippet']) ) {
return;
}
What that says is, if you aren't displaying the main content of the page (running "The Loop"), showing an admin page, or displaying a "snippet" (CiviCRM content that belongs within another page), go back and do nothing. CiviCRM will be invoked again when it's the time to run the actual page content.
For reference, the pull request I made in GitHub to handle this is at https://github.com/civicrm/civicrm-wordpress/pull/36/files, where you can see the end result.
If you're in CiviCRM 4.3 or earlier, you'll want to add those lines to the function civicrm_wp_invoke, inserting them after the following (at or near line 292):
function civicrm_wp_invoke() {