0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Gantry theme code

    • HPEDSB's Avatar
    • HPEDSB
    • Sr. Rocketeer
    • Posts: 189
    • Thanks: 2

    Gantry theme code

    Posted 8 years 7 months ago
    • I am using the gantry Callisto theme.

      I am looking for this code
      <?php while (have_posts()) : the_post(); ?> which is usually in the index file or post file. I don't see it.
      Where would I find this code in a gantry theme?
      I am looking to add a piece of custom php code to my theme or more specifically my post pages.
    • Last Edit: 8 years 7 months ago by HPEDSB.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 22324
    • Thanks: 3230
    • messin' with stuff

    Re: Gantry theme code

    Posted 8 years 7 months ago
    • custom WordPress PHP functions would still go in the functions.php file like normal...

      We use TWIG which sits on top of PHP

      \wp-content\themes\theme\views\partials

      is where most of the core output is generated from

      content.html.twig is the primary file

      {{ post.content }} is how you call the Post in TWIG

      You can also define your own PHP functions within Gantry: docs.gantry.org/gantry5/advanced/php-functions
    • Last Edit: 8 years 7 months ago by Matt.
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:

Time to create page: 0.078 seconds