This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// original source - https://wpsites.net/web-design/change-genesis-widget-title-html-tag-from-h4/ | |
add_filter( 'genesis_register_widget_area_defaults', __NAMESPACE__ . '\change_all_widget_titles_to_p' ); | |
function change_all_widget_titles_to_p( $defaults ) { | |
$defaults['before_title'] = '<p class="widget-title widgettitle">'; | |
$defaults['after_title'] = "</p>\n"; | |
return $defaults; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function twxyz_prevent_gform_submission( $form ) { ?> | |
<script type="text/javascript"> | |
jQuery(document).bind('gform_post_render', function(){ | |
jQuery(document).on( 'keypress', '.gform_wrapper', function (e) { | |
var code = e.keyCode || e.which; | |
if ( code == 13 && ! jQuery( e.target ).is( 'textarea,input[type="submit"],input[type="button"]' ) ) { | |
e.preventDefault(); | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thanks to: https://gist.github.com/jdbartlett/444295 | |
# Ignore everything in the root except the "wp-content" directory. | |
/* | |
!.gitignore | |
!wp-content/ | |
# Ignore everything in the "wp-content" directory, except the "plugins" and "themes" directories. | |
wp-content/* | |
!wp-content/plugins/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
User-agent: * | |
Disallow: /wp-admin/ | |
Disallow: /wp-login.php | |
Disallow: /?s= | |
Disallow: /search/ | |
Allow: /wp-admin/admin-ajax.php | |
Sitemap: https:// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### DISABLE mod_security firewall | |
### Some rules are currently too strict and are blocking legitimate users | |
### We only disable it for URLs that contain the regex below | |
### The regex below should be placed between "m#" and "#" | |
### (this syntax is required when the string contains forward slashes) | |
### @src https://stackoverflow.com/questions/12928360/how-can-i-disable-mod-security-in-htaccess-file | |
<IfModule mod_security.c> | |
<If "%{REQUEST_URI} =~ "m#/wp-admin/admin.php?page=gf_edit_forms/#"> | |
SecFilterEngine Off | |
</If> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{ENV:HTTPS} !=on | |
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// To add custom data above add to cart button in woocommerce | |
// step 1 | |
add_action('wp_ajax_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); | |
add_action('wp_ajax_nopriv_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback'); | |
function wdm_add_user_custom_data_options_callback() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} !^www\. | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] | |
</IfModule> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_theme_support( 'custom-logo', array( | |
'height' => 240, // set to your dimensions | |
'width' => 240, | |
'flex-height' => true, | |
'flex-width' => true, | |
) ); |