0
Welcome Guest! Login
0 items Join Now

Gantry and Custom Fields

  • Gantry and Custom Fields

    Posted 13 years 1 month ago
    • Does Gantry support custom fields? If yes how do you use them in your theme?
    • jalneal's Avatar
    • jalneal
    • Newbie
    • Posts: 5
    • Thanks: 0

    Re: Gantry and Custom Fields

    Posted 12 years 11 months ago
    • Wordpress supports custom fields, and you can use them in the Gantry theme, but I have not yet seen a way to do this in the Gantry UI. To learn more about how to display the custom fields, check out codex.wordpress.org/Custom_Fields . The easiest thing is first displaying wp_meta(). It should provide you a list of all custom field names and values. This eliminates the chance that it could be incorrectly typing out field names when you are trying to get the content.

      There are several ways to display.

      1) For pages/posts, you can edit the php files in the template (it doesn't take a lot of knowledge of PHP, but it does take some knowledge of HTML) I usually add a div to the page before or after the main content and give it a class, then call to get all the values I want.
      When I'm done with that, I go into the CSS and format the different elements for that class. It works very well.

      2) for Widgets, create custom widgets, and do the same thing as above. for modifying the template files and creating custom widgets, there are several online tutorials, just google them and there should be a wealth of them. I hope that helps.
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Gantry and Custom Fields

    Posted 12 years 11 months ago
    • Hi,

      Thanks Janneal for your info. There is no built in Custom Field option in Gantry, you have to do it the old fashioned way as described above. There are countless sources of information about how to do this on the web - just Google "create custom field wordpress" and have at it.
    • The difficult we do immediately, the impossible takes a little longer.
    • Tim Berneman's Avatar
    • Tim Berneman
    • Elite Rocketeer
    • Posts: 878
    • Thanks: 0
    • Website Manager

    Re: Gantry and Custom Fields

    Posted 12 years 9 months ago
    • Although there isn't a plugin/widget in the Gantry Framework as of July 2011, there are alternatives. I've used the "Custom Field Widget" by Scott Allan Wallick, the "Advanced Custom Fields" widget by Elliot Condon, and the "Conditional Custom Fields Shortcode" widget by Godfrey Chan. I believe all of them are in the Wordpress Repository.

      Tim :o]
    • Tim Berneman
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Gantry and Custom Fields

    Posted 12 years 9 months ago
    • Thanks for your info Tim, I'll take a look at those as well 8)
    • The difficult we do immediately, the impossible takes a little longer.

Time to create page: 0.040 seconds