Ollie Murphy
Forum Replies Created
-
Forum: Plugins
In reply to: [Customize Submit Button for Gravity Forms] Paging buttonsThanks for the feedback Christopher.
Yes, that sounds like a good idea for the next release. I’m a bit slammed with work at the moment but I’ll look into pushing that out.
If you’re willing, you can also give it a shot. I have the plugin on github ( here: https://github.com/omurphy27/customize-submit-button-for-gravity-forms ) and you can feel free to open a pull request.
Cheers
You can display the product author just like you would a post author.
So, for example, anywhere in one of the single product WooCommerce templates (like the ones found here: /woocommerce/templates/single-product), you can just add the following code which will echo out the author name:
<?php the_author(); ?>Alternatively, you can also echo the product author out via an action in the functions file like below (which will echo out the author below the price but above the add to cart button):
function om_show_author_on_single_product() { echo "<p>Product from <strong>" . get_the_author() . "</strong><p>"; } add_action( 'woocommerce_single_product_summary', 'om_show_author_on_single_product' , 15 );Plenty of other functions are also available for getting other author data (such as author website URL, author posts link, etc). See here for more details: https://codex.ww.wp.xz.cn/Function_Reference/the_author
Forum: Plugins
In reply to: [Gravity Forms: Post Updates] Update of custom field removing html codeGravity Forms has a filter which lets you specify which HTML tags get stripped out here: https://www.gravityhelp.com/documentation/article/gform_allowable_tags/
Adding <table> and the other table related tags, <td> etc. to the above allowable tags filter like below should be enough.
add_filter( 'gform_allowable_tags', 'om_allow_basic_tags', 10, 3 ); function om_allow_basic_tags( $allowable_tags ) { return '<p><a><strong><em><table><tbody><tr><th><td>'; }However, the input also gets run through the wordpress wp_kses_post() function, which in my case was removing my iframe markup even though I had allowed iframes in the above filter. I ended up having to also add iframe to the allowed tags for the wp_kses function by doing the following:
add_filter('wp_kses_allowed_html', 'om_allow_iframes'); function om_allow_iframes( $allowedtags ) { $allowedtags['iframe'] = array( 'src' => array(), 'height' => array(), 'width' => array(), 'frameborder' => array(), 'allowfullscreen' => array(), ); return $allowedtags; }You might have to do the same for the table tags, not sure.
Forum: Themes and Templates
In reply to: [Zerif Lite] Zerif Lite child themeThanks Ericmulder, that hook worked, except now the parent stylesheet is enqueued after my child theme stylesheet. I’m using my child theme css to overwrite a bunch of styles, so I want to have it enqueued after the parent theme stylesheet.
To do so, I deregistered the child sheet stylesheet and then re-registered / enqueued it after like below:
// enqueue the parent theme stylesheet with a low priority so it loads after bootstrap CSS add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 11 ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'child_theme_enqueue_styles', 12 ); function child_theme_enqueue_styles() { // remove child theme style sheet from being called before parent stylesheet wp_deregister_style( 'zerif_style' ); // enqueue child theme style sheet again wp_register_style( 'my_child_theme_style', get_stylesheet_directory_uri() . '/style.css', array(), null, 'all' ); wp_enqueue_style( 'my_child_theme_style' ); }Hmmm. Seems to go away when I simply delete the wysiwyg fields generating the error and recreate them. So I suppose it’s fixed now.
Forum: Fixing WordPress
In reply to: Googlebot cannot access CSS and JS filesI disagree with this. You definitely want to block directories you don’t want crawled regularly or more importantly, indexed.
Apparently WordPress no-indexes files in the wp-admin directory by default, so they won’t be crawled even if the directory isn’t blocked in the robots.txt
From Yoast:
WordPress has a robots meta x-http header on the admin pages that prevents search engines from showing these pages in the search results, a much cleaner solution.
In other words, I think we’re good to leave the robots.txt file blank.
Forum: Fixing WordPress
In reply to: Googlebot cannot access CSS and JS filesI, too, received this notification for dozens of my sites.
Most of the sites were completely up to date and only the /wp-admin/ was being blocked in the robots.txt, which is something WordPress appears to do be default and isn’t related to any plugin.
When I used the Fetch and Render tool in GWT and saw what Google has rendered, Google bot was being blocked from accessing some scripts under /wp-admin/, with admin-ajax being the main culprit.
As a temporary fix, I just removed the /wp-admin/ disallow entirely using the below filter:
add_filter( 'robots_txt', 'om_remove_wp_admin_block', 10, 2 ); function om_remove_wp_admin_block($output, $public) { if ( !$public ) { return $output; } else { $output = ""; return $output; } }I then reran the Fetch and Render in GWT and my site passed without any issues.
According to Yoast, removing the wp-admin block shouldn’t be a problem either: https://yoast.com/wordpress-robots-txt-example/#updates
Forum: Plugins
In reply to: [Simple Instagram] Updating to the latest version broke my siteMuch better, everything works now with version 2.0.2
One minor annoyance, but I did have to reauthorize instagram in your plugin after upgrading. Not sure if you can do anything about that.
Anyway, thanks and great plugin!
Forum: Reviews
In reply to: [Advanced Custom Fields (ACF®)] A definite must-have pluginGravity Forms, Wordfence, and WordPress SEO for Yoast.
Then WooCommerce if there’s any ecommerce.
Those 5 plugins are generally enough for 90% of my clients and websites.
Forum: Plugins
In reply to: [Gravity PDF] Example templates not working – getting WP debug errorDuurrr, I just upgraded gravity forms from 1.8 to 1.9.1.2 and everything works fine now.
Thanks for the help. I’ll close this out now.
Forum: Plugins
In reply to: [Gravity PDF] Example templates not working – getting WP debug errorI just tested it another server with PHP 5.4 and everything appears to be working fine.
Can I assume this issue is caused by the old php version and if so then what can be done about it? (besides upgrading PHP which sadly isn’t an option)
Forum: Plugins
In reply to: [Gravity Forms: Post Updates] Problem showing edit form based on edit linkOk, it seems that the generated nonce is user specific and without it appended, the form won’t contain any data. So we’re good here, please ignore my question.
In case anyone has the same problem, my solution was just to hide it via CSS.
I did this by adding the following to my functions file:
add_action('admin_head', 'remove_wp_seo_score_title'); function remove_wp_seo_score_title() { echo '<style> .misc-pub-section .wpseo-score-title { display: none; } </style>'; }Any update on this?
According to Yoast (https://twitter.com/yoast/status/372393537771667456), this is on purpose. It’s to prevent duplicate meta descriptions in Google Webmaster tools.
So, even though MOZ is marking this as a problem, I guess it’s not an issue from an SEO point of view.