php

generate_typography_customize_list

I’m attempting to use the generate_typography_customize_list function to add the three parts of the Barlow family from Google Fonts to the Customizer’s font list. I’m following the instructions here. I’ve added the relevant code to my child theme’s functions.php file. The typefaces do not show up in the Customizer, however. I’m developing this site under … Read more

Adding 'WP show posts' php to premium GP

Hi Tom (and support) I’ve been struggling with adding some php to a category-slug page that I created in premium GP. What I intended to do on this category page was to display: Sub-category: – 3 posts Sub-category: – 3 posts After doing my best to swat up on the loop (resetting etc) and templates … Read more

Foreach errors shows in Dashboard

Hello Tom & Leo, I get the following error messages from time to time: Warning: Invalid argument supplied for foreach() in /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php on line 338 Warning: Invalid argument supplied for foreach() in /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php on line 365 Warning: Cannot modify header information – headers already sent by (output started at /home/dh_8kfwgz/domain.com/wp-content/plugins/gp-premium/sites/sites.php:338) in /home/dh_8kfwgz/domain.com/wp-admin/includes/misc.php on line 1114 … Read more

custom post template editing

Hi, I´m having trouble with the configuration od a custom post type for projects. My workflow so far: I’ve CPT UI and got the custom post type for projects . So a new category. I’ve a child theme for GP where in functions i’ve added all the code CPT UI tells us to add. I … Read more

Adding Breadcrumbs to GP

Good morning Tom, I have been reading through quite a few posts related to getting breadcrumbs on a GP site but it seems a little overwhelming as I do not know PHP and am fearful I will make a mistake. It seems most references are made to the Yoast plugin which is what I use … Read more

Add a page with php

Is there a way to add a page containing php? I want to add a contact page with email form. I tried uploading the page (contact.php) to the theme folder, and the child-theme folder. However when I enter the url, it gives a 404 error. I could make a shortcode, but it will make my … Read more

Deregister Jquery on Specific Page

Trying to deregister wp-includes jquery and jquery-migrate on specific pages to load a different jquery library. Searched all over but couldn’t figure it out so I thought I’d ask you. What handles should I use to deregister wordpress’ jquery scripts? ‘jquery-ui-core’ doesnt work and ‘jquery’ deregisters all jquery libraries including the ones im trying to … Read more

define( 'GENERATE_HOOKS_DISALLOW_PHP', true );

Hi Tom After adding “define( ‘GENERATE_HOOKS_DISALLOW_PHP’, true );” to wp-config i found that execute PHP under GP hooks stopped working. After i removed it from wp-config it start working again. Thanks Edwin

"Best Practises" for working with Generatepress

Hi all, Just curious as to what is generally considered the best approach when needing to make PHP and CSS changes to the GP child theme. Should I make changes in the functions.php and style.css files within the child theme or is it generally considered the better practise to use a plugin and GPP hooks … Read more

Category Image header "broke" with latest update

Howdy. I have php in my theme that directs the post header in all posts in a certain category to be full width, as discussed here: https://generatepress.com/forums/topic/category-image-header-css/ I just updated GP this morning and the header is now tiny. See here: https://dalecameronlowry.com/what-media-gets-wrong-chechnya-anti-gay-campaign/ What’s the fix?