0
Welcome Guest! Login
0 items Join Now

SOLVED Need help for Developing Custom Theme

  • SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • Hello Everyone


      It seems to be a bit harder than I expected to find any infos on how to develop or integrate one of our self produced Wordpress Themes.
      My main questions would be, where do I look? There aren't any Documentations anywhere on how to make a Theme from scratch.

      I was also looking through all the files, however it's quite hard for me to understand how the YAML and TWIG, and also SCSS files all work.
      I understand that all of them are used as a way simpler way of programming a theme. The issue for me is, that I haven't worked with YAML and TWIG files yet. SCSS is pretty easy to understand on the other hand.

      Stil a bunch of CSS parts are a mysterious to me.

      My questions
      1) What do i need to know, to be able to develop my own gantry 5 theme?
      2) Is there Documentation which can help me? (can't find it)

      Server Details (Linux/Windows, Hosting service, etc)Debian
      PHP versionShould be PHP7
      Platform (name and version)Wordpress current
      Template/Extension (name and version)Not applicable
      Link to the Issue-
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • There's a lot of documentation on this:

      http://docs.gantry.org/gantry5/theme-development
      http://docs.gantry.org/gantry5/advanced (many sections here that you need to learn about).

      I would suggest that you start by looking at our most basic free theme (Hydrogen) and looking at how that all works, then move on to Helium (which is still basic but a little more advanced) and then finally load one of the rocketlauncher packages for one of the RT commercial themes.

      You need a good understanding of Gantry 5 before you should start on developing your own themes as it is a very advanced subject.

      Regards, Mark.
    • The following users have thanked you: Erin#5566

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • I have another question, is it possible to add PHP in the backend, to test and possibly integrate certain codes/functions/reactions etc. to the theme. So for example if i want to display the page title at a chosen place?

      <title><?php wp_title(''); ?></title>


      Or is it only possible through configuration of the files themselves?

      Best,
    • Last Edit: 6 years 6 months ago by Erin#5566. Reason: code missing
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • use WP_DEBUG, Gantry 5 debug mode, Gantry 5 debugbar widget and TWIG dump().

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • I think you understood me wrong. My question is, if there is a way to add PHP, like with the HTML Code widget for example.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • Well you can use a widget to add php into your posts and pages if that's what you mean. You can also add you own PHP functions that you can call from TWIG too http://docs.gantry.org/gantry5/advanced/php-functions . But the themes use TWIG and YAML so you should be debugging from TWIG. You can also access many of the Wordpress fields from TWIG too http://docs.gantry.org/gantry5/advanced/content-in-particles

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • You mean a Wordpress native widget, not a Gantry 5 widget/plugin right?

      I'll do some research and check what's possible.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13484
    • Web Designer/Developer

    Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • Yes, that's what I mean.

      I think you need to study the basics first with Gantry 5 because things are done very differently to what you might be used to. Study the basic themes and their inherent particles (e.g. contentarray particle) to learn how to access WP fields inside TWIG. If you really need to use PHP then you can add you own PHP classes to use in TWIG following the link I gave you above. You cannot just write PHP in TWIG itself, or the particles themselves, or the template itself.

      Regards, Mark.
    • The following users have thanked you: Erin#5566

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED Need help for Developing Custom Theme

    Posted 6 years 6 months ago
    • thanks for taking your time :)

Time to create page: 0.063 seconds