Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Revised Question:

I have a WordPress based website with the Crystalline theme installed (made by RocketTheme, uses the Gantry framework). When I create new pages, they do not show the intended content and instead display the home page content.

Original:

The Issue

Permalinks for Pages created since migrating from a LAMP server to a Windows/IIS server incorrectly load the home page content, regardless of whether I use the default Permalink structure or a custom Permalink structure.

So, if I attempt to visit www.domain.com/wordpress/new_page/, it loads the content from www.domain.com/wordpress/, but the URL does not change; it remains www.domain.com/newsite/new_page/.

However, loading a page created before the transition works fine, so if I attempt to visit www.domain.com/wordpress/old_page, it loads the intended content.

As far as I can tell, there is some problem with the internal rewriting that Wordpress does, since a problem with my .htaccess rules would affect all pages. I do not know how to start debugging this though.

Additional Info

  • Permalinks work for all pages that existed when I migrated, even if I change the permalink structure in Settings->Permalinks

  • If I make a newly created Page into a child of a pre-existing Page, visiting the newly created page's Permalink now loads the correct content. So, www.domain.com/wordpress/old_page/new_page/ will load the intended content.

  • If I make a pre-existing Page into a child of a newly created page, these are the results:

    www.domain.com/wordpress/new_page/old_page/ loads the intended content

    www.domain.com/wordpress/new_page/ does not load the intended content

  • I am using ISAPI_Rewrite 3. The following is my global configuration file (I am not doing per directory .htaccess files):

RewriteEngine On  
RewriteBase /  

#New wordpress site  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteRule .*wordpress/.* /wordpress/index.php [L]  

#Whole site  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteRule .* /index.php [L]`  

share|improve this question

1 Answer 1

The Crystalline theme rolls it's own templates, which it calls overrides, instead of using the standard WordPress templating approach. In WordPress, the standard way is to create multiple template files inside the theme directory, then choose which template to use when editing a page in the WordPress dashboard.

With Crystalline there is a single template file, called index.php. This template file then makes calls to the Gantry framework in order to figure out what to display. So, you create separate overrides within the Crystalline settings area. Then, you have to specify which pages use which override, again from within the Crystalline settings area.

Once you do this everything works as planned.

So, here's the logical flow of what's going on (again, as best as I can tell):

  1. Page request comes in.
  2. WordPress engine tells the Crystalline WordPress template to display the page.
  3. Crystalline WordPress template makes a bunch of calls to the Gantry Framework.
  4. The Gantry Framework determines what Gantry template to use based on it's own internal settings.
  5. Finally, Gantry spits out some HTML, JS, and CSS.

Here's how you actually add templates to Crystalline (Gantry) and specify which pages should use which templates:

  1. From the WordPress dashboard, click the Crystalline button in the lower left corner.
  2. There is a dropdown menu labelled "Default Settings", this is your list of overrides (templates).
  3. Selecting an override will allow you to make changes to the style, layout and widgets it uses.
  4. The assignments tab for each override is where you specify which pages use that override.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.