php

PHP filter with two conditionals

Hi. I added a Yummly button to recipe posts on one site using GP Hooks “After Entry Title.” <?php if ( in_category( 'food' ) ) { ?> <a href="//yummly.com" rel="nofollow" class="YUMMLY-YUM-BUTTON">Yum</a> <script src="https://www.yummly.com/js/widget.js?wordpress"></script> <?php } ?> It looks great on the posts, but it’s also showing up on the category pages, which I don’t want … Read more

Applying CSS to hook content

Hi Tom and team, im a little out of depth here, i have cobbled together the below PHP snippet which puts the product (post) excerpt into the shop loop. Now i dont know how to style the excerpt using CSS. I have looked at creating DIV and Classes etc but thats beyond me. Any ideas? … Read more

Custom Excerpt Function Help?

I am using a custom function to grab text from the content, so that I don’t have to fill in the excerpt field. I am mainly using this for custom post types. It is working, but I can’t seem to overwrite GP’s read more link. Function below: function get_excerpt(){ $excerpt = get_the_content(); $excerpt = preg_replace(” … Read more

Keep getting this error message

When I set a page as the blog and try to edit it using Elementor, I get this error message: what php file do I place this line of code? Thanks in advance, John

PHP problem with new version of GP Premium

Hi everyone, I installed the latest version of GP Premium and since then every time I try to edit a page I get the message below: ( ! ) Fatal error: Call to undefined function wp_add_inline_script() in /home/aguiarqualidade.com.br/www/wp-content/plugins/gp-premium/sections/functions/metaboxes/metabox-functions.php on line 159 Call Stack # Time Memory Function Location 1 0.0146 234320 {main}( ) …/post.php:0 2 … Read more

Comment Box on Latest Posts Home Page

I have a client who would like the comment box to appear below the blog posts on the home page (which is set for latest posts) instead of the “Leave a comment” link (that takes the person to the blog page). I know this can be done by customizing the PHP but I prefer not … Read more

Single Page PHP

Hi, On my site http://shortdailydevotions.com, I have moved the post title to the header and hidden the post title in the content via css. This is what I use in the GP hooks <?php if ( is_single() ) : ?> <div class="page-header-content generate-page-header generate-content-header"> <div class="grid-container"> <div class="above-header-title"> <center><?php single_post_title(); ?></center></div> </div> </div> <?php endif; … Read more

urlencode error message…

Hi Tom. Happy New Year. I have the error message at the bottom of my search results page using this plugin… https://wordpress.org/plugins/ultimate-wp-query-search-filter/. I’ve been using the plugin for some time without any error but it threw this error on an update a few months a go (I don’t know which one). Warning: urlencode() expects parameter … Read more

custom post type creation

Tom, I’m using a GP child theme and I want to make a Review post type with a copy of the post.php I really don’t want any more plugins installed and I surely don’t want to use any other theme. It’s time for me to get my hands dirty. can you recommend anything that will … Read more