Gantry Template Creation Fails with 777 and safe mode off -- plug-in does not use manually created s

I'm having trouble creating a custom post template in WordPress Gantry. Perhaps this post will save someone else some aggravation.

I've learned a couple of things.

CustomPress will not create a custom post type for Gantry in Word Press because the single.php file is stored in a subdirectory of wp-content even if permissions are set correctly to 777 and php in is safe mode off. CP is looking in wp-content not wp-content/html for the file single.php

If I manually create the file single-custom_name.php by copying it still does not seem to be used. I can tell this by modifying single.php and single-custom_template.php to have different text in them. And Gantry only seems to use the single.php file.

In Gantry all overrides and customization happens in the Themes/Widgets area.
Once you create a new override there you can switch to Gantry Setting and the the Assignments tab to choose when you want to override the single.php setting. Then if you go back to widgets you can copy code out of single.php and put it in the widgets where you want it.

So for good developer recordkeeping I recommend manually creating a copy of single.php to single-custom_template.php and then inserting comment lines in the new file to show what code got copied out to Gantry widgets and you are expecting the code in the widgets to override.

All that said, I like the CustomPress plugin because it allows me to create posttypes, custom taxonomies, and custom fields all with one plugin. And I can use the posttype in the gantry override without having to remember to code a category or tag everytime.

Hope this helps someone else. I've stopped pulling my hair out now.

  • battle

    Shawn,

    Perhaps I was not clear because at the time I wrote this I had not completely configured my solution.

    Gantry is a non compliant theme.

    Gantry is not set up in the "normal" WordPress way. The single.php is in an alternate location which means most other 3rd party plugins will not work with gantry if it involves duplication or editing of the single.php file because they are looking in the standard location, not the custom gantry location. I'm sure this applies to other aspects of gantry too.

    I'm sure there is a way to make gantry use an alternate file to single.php or not use it, however that is not what I am doing. I never did figure it out. If I used a custom post file name it broke other stuff because we were still dealing with the issue of different plugins looking in different locations for the file.

    I'm taking small portions of the single.php code for the displaying the title or tags listings for example and using them in gantry widgets. The single.php file still gets used. You could modify the single.php file to eliminate what you don't want to appear by commenting it out, but to be fair to the Custom Press plug in its not really a custom post type in the sense that the layout can be different that a regular post type. You can still do much that customization with the gantry overrides and assignments, but the single.php file used is the same for regular and custom posts types.

    Because the code blocks are in php you will need an additional plugin such as PHP Text Widget to allow you to put the copied code into gantry text widgets.

    I don't think I modified any php to make this work other than copying or commenting out portions of single.php.

    Hope this provides a bit more clarity. Post again with more specific questions if this doesn't address your concerns.

    Battle

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.