- This topic has 5 replies, 3 voices, and was last updated 4 years, 5 months ago by
David.
-
AuthorPosts
-
April 23, 2021 at 2:56 am #1745692
Janine
Hello,
I’m completely new to GP but am a web developer familiar with the basics of customising WP themes.
I’m switching an existing WP site to GP Premium as it looks much more solid & also hoping to improve performance.I started with the Arctic theme and have been using the customiser and adding bits of custom CSS so far, working through the docs as I go. I haven’t got into Elements yet. Just activated most of the other pro modules to customise things via the UI.
I’ve reached the stage where I now need to change things beyond the customiser e.g.
1) move meta from the bottom of posts to near the top & restyle
2) show the updated date rather than the post date, ideally for only certain posts
2) possibly create a custom homepage in timeIn the past, I would have just created a child theme from the off and hacked away at things there. But GP seems different with the way the premium stuff is a plugin on top of the free theme.
I know there are lots of bits and bobs in the docs for changing specific things, but I am keen to know the best practice approach to overall customisation for web developers.
Should I still go the custom theme route?
Is it best to try and modify templates via functions.php rather than copying the relevant GP theme files to the child theme?
Is it too late to set up a child theme when I have already changed a lot of settings through the customiser?I’m looking to use GP long term on a number of sites, so would like to follow best practice from the off.
Thanks for your time,
Janine.April 23, 2021 at 8:34 am #1746207Leo
StaffCustomer SupportHi there,
1 & 2: In the current version, we would need to use some PHP/filter solutions. However, the upcoming GP Premium 2.0 will make this much easier with the help of dynamic data:
https://generatepress.com/introducing-the-gp-theme-builder/
We are currently in release candidate 3 so the official version shouldn’t be too far away. That will be the best and easiest method going forward.
Does that help?
April 24, 2021 at 3:36 am #1746833Janine
Hi Leo,
Thanks for replying. The 2.0 element features look impressive.
Are child themes still a valid approach or not recommended?
Is there any performance difference between doing things with elements vs using a plugin or child theme?
Similarly, which performs better: CSS in a child theme or via additional CSS in the customizer (with external file and cache options on)?
Thanks,
Janine.April 24, 2021 at 5:47 am #1746928David
StaffCustomer SupportHi there,
Are child themes still a valid approach or not recommended?
Child Themes still have their place and we use them on many of our builds. Mainly for the purpose of the functions.php as the theme is filled with Hooks ( action and filters ) so theres rarely a requirement to copy and edit a Theme template within a child theme … but they are still needed if you are adding very specific custom templates.
GPP 2.0 and the Elements module really pushes that out to a new level as you can now overwrite the Loop using a Block built template – meaning less code and less need to add to the functions.php.
Is there any performance difference between doing things with elements vs using a plugin or child theme?
Little or no noticeable difference – although if you’re working within the functions of the Theme – then Elements is possibly the most efficient method as behind the scenes its writing very simple hook/filters within specified conditions.
If i can use an Element for something then i will always opt for that first. Thats not to say i won’t be adding to the functions.php for specialist requirements.
Similarly, which performs better: CSS in a child theme or via additional CSS in the customizer (with external file and cache options on)?
This really comes down to amount of CSS you’re writing – large amounts of CSS are always best in the Child Theme CSS ( or plugin ) so the browser can cache the file. Small amounts of CSS via the Customizer > Additional CSS is added inline, so although not cacheable ( without a cache plugin in play ) it can be more efficient.
As a note – our GenerateBlocks plugin generates dynamic CSS. There is no static stylesheets – it simply generates the CSS for the blocks that get parsed for that page. If theres no GB blocks then it doesn’t generate CSS. And the GB Pro version really boosts that with Global Styles – which will allow you to build reuseable CSS styles to further minimize duplicate CSS.
Overall – Child Themes still have their place but we are continually striving to minimise the need for them 🙂
April 24, 2021 at 9:35 am #1747316Janine
Hi David,
Many thanks for explaining all this. It’s really helpful.
I’m looking forward to learning more about GP so I can get the most from it.Thanks,
Janine.April 25, 2021 at 3:54 am #1747861David
StaffCustomer SupportYou’re welcome !
-
AuthorPosts
- You must be logged in to reply to this topic.