PayneStudios
Forum Replies Created
-
Version: WordPress 5.9.1
Theme: Legit News, Version: 1.0.5, Child theme.Update: when I remove the ReCAPTCHA site key and Private key from the WP Email Capture configuration, the form works.
I copied & pasted those ReCAPTCHA v.3 from the Google ReCAPTCHA site.Web root error log includes:
[22-Feb-2022 23:03:34 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home3/thegilm2/public_html/wp-content/plugins/wp-email-capture/inc/display.php:17) in /home3/thegilm2/public_html/wp-content/plugins/jetpack/modules/custom-css/custom-css-4.7.php on line 105
[… repeats …]
[22-Feb-2022 23:03:43 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home3/thegilm2/public_html/wp-content/plugins/wp-email-capture/inc/display.php:17) in /home3/thegilm2/public_html/wp-includes/pluggable.php on line 1355
[22-Feb-2022 23:03:43 UTC] PHP Warning: Cannot modify header information – headers already sent by (output started at /home3/thegilm2/public_html/wp-content/plugins/wp-email-capture/inc/display.php:17) in /home3/thegilm2/public_html/wp-includes/pluggable.php on line 1358
[… this pair of lines repeats … ]Update: I tried a few more things (I’m flailing):
1. Don’t enqueue parent theme; instead, enqueue its script writr_scripts() ahead of mine:function theme_enqueue_styles() { // wp_enqueue_style( 'writr-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'writr-child-style', get_stylesheet_directory_uri() . '/style.css', array('writr-style') ); } add_action( 'wp_enqueue_scripts', 'writr_scripts' ); add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
No good: this failed to load parent theme’s style.css.
2. Same as above, but uncommented
wp_enqueue_style( 'writr-style', get_template_directory_uri() . '/style.css' );
Same result.3. Switched order of add_actions:
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); add_action( 'wp_enqueue_scripts', 'writr_scripts' );
Back to my original problem: parent style.css is enqueued and used, but not parent css/wider.css.
Thanks to MarsianBoy for your research. I’m having the same problem. Tried the code, perhaps incorrectly; didn’t work. Sorry for long excerpts, but I am as clueless as anyone. Using parent theme “writr”, which enqueues stylesheets thus:
/* Register Google fonts. */ function writr_fonts() { ... if ( 'off' !== _x( 'on', 'Montserrat font: on or off', 'writr' ) ) { wp_register_style( 'writr-montserrat', "https://fonts.googleapis.com/css?family=Montserrat:400,700", array(), null ); } } add_action( 'init', 'writr_fonts' ); /* Enqueue scripts and styles. */ function writr_scripts() { wp_enqueue_style( 'writr-montserrat' ); if ( wp_style_is( 'genericons', 'registered' ) ) wp_enqueue_style( 'genericons' ); else wp_enqueue_style( 'genericons', get_template_directory_uri() . '/css/genericons.css', array(), null ); wp_enqueue_style( 'writr-style', get_stylesheet_uri() ); $colorscheme = get_theme_mod( 'writr_color_scheme' ); if ( $colorscheme && 'default' !== $colorscheme ) wp_enqueue_style( 'writr-color-scheme', get_template_directory_uri() . '/css/' . $colorscheme . '.css' , array(), null ); if ( get_theme_mod( 'writr_wider_style' ) ) wp_enqueue_style( 'writr-wider-style', get_template_directory_uri() . '/css/wider.css' , array(), null ); ... }
My child functions.php contains:
<?php function theme_enqueue_styles() { wp_enqueue_style( 'writr-style', get_template_directory_uri() . '/style.css' ); wp_enqueue_style( 'writr-child-style', get_stylesheet_directory_uri() . '/style.css', array('writr-style') ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); ?>
My child style.css has all the necessary header comments (from the Codex), then:
blockquote { font-style: italic; }
On my site,
<blockquote>
is correctly styled with italic, so I know that my stylesheet is being read; and most of the basic styling from the parent theme also appears to be in effect. The problem is that the content-area is too narrow. The parent theme writr, in the main style.css, says:.content-area { ... width: 540px; ... }
Another stylesheet in parent theme, css/wider.css, is supposed to override this (and does so correctly when the parent theme is in effect):
@media only screen and (min-width: 1220px) { ... .content-area { width: 800px; } ... }
So it seems that css/wider.css is not being read in.
In the example child functions.php here, there is a comment:
/* Twenty Fourteen functions and definitions*/
Does that mean to copy and paste the entire body of the parent functions.php into your child functions.php? If you do that, wouldn’t that prevent my site from seeing updates to the parent theme’s functions.php? Also, I think that it would break things to call all those functions twice, right?Forum: Themes and Templates
In reply to: De Naani moved my widgetsMe too. This is my first time using the theme de naani. Theme Twenty Twelve shows the side widgets correctly on the side.
I have the same problem.
Software:- WordPress v. 3.4.1
- Contact Form 7 v. 3.2.1
- Better WordPress reCAPTCHA v. 1.0.1
- Contact Form 7 reCAPTCHA extension v. 0.0.12
Settings:
- Better WordPress reCAPTCHA:
- This plugin will be:
- (yes) enabled for comment forms
- (no) enabled for registration page
- Hide the CAPTCHA for: (yes) registered users
- Integrate with Akismet? (yes)
Contact form: at https://coalitionagainstnukes.org/contact/
- Form contains:
[recaptcha recaptcha-988]
- Page contains:
[contact-form-7 id="21" title="Contact form 1"]
When I access the form and I am not logged in to WP, I see the captcha field; if I fill in that field and all the other fields correctly, I get:
“Your message was sent successfully. Thanks.”
But when I am logged in to WP, the captcha field is not displayed. When I submit the form with equivalent data filled in, it fails with:
“Validation errors occurred. Please confirm the fields and submit it again.”