Functions.php + Define template parts

Hello! First I need to say that I’m a Wordpress beginner who lately did his first attempts into creating a Wordpress theme from a HTML website. I recently bought a full licence of Pinegrow Pro WP.

I’m having difficulties to understand how Pinegrow “is mixing” static HTML and Wordpress hooks/actions e.t.c.

What If I want to edit the functions.php after exporting the theme? If I do it in a code editor all these changes can’t be taken back into Pinegrow. So basically I never do have “straight” access to the actual files of my theme in Pinegrow, right? But how can I edit the functions.php within Pinegrow?

When I define a template part from a HTML snippet (like aside) with the “define template part” option, the snippet is being taken out of the Dom when I activate the theme. So actually I could just define it anywhere in the “Pinegrow dome?” and include where I want.

For me Pinegrow is overwhelming but fascinating. The lack of a file explorer is giving me headaches, though.

Any help would be much appreciated!

Thanks!

Best regards,
Pierre

Hi @pierrehansen have you looked at this article from the docs “How to add code snippets to the functions.php file” and this might also be of help “Why and How to create a settings page”, I’m not sure how relevant it is to your situation but I thought there’s no harm in sharing it with you.

Thanks Rob! Im diving into it by reading the tutorials.

One more question/issue:

For example: If I want to register a new post type, I would usually do it in my functions.php. But in Pinegrow I have to add the register_post_type to an element in my DOM, is that right? That’s a little odd to me and I have to get use to it.

Thanks!
Pierre

@pierrehansen yes that will add the necessary code to the functions.php file for your custom post type.