hebhansen
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effect@threadi Chat GPT siger dette spiller??
add_action( 'wp_enqueue_scripts', 'draupnir_9_enqueue_styles' );
add_editor_style( 'editor-style.css' ); // Correct usage
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri()
);
wp_enqueue_style(
'twentytwentyfour-primary',
get_parent_theme_file_uri( 'assets/css/primary.css' )
);
}- This reply was modified 2 weeks ago by hebhansen.
@iodic Theme says the same. Ask Woo, so here I am. Who saw this happen before?
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effectScript break my site….
So maybe stay with this and get it to work….
add_action( 'wp_enqueue_scripts', 'draupnir_9_enqueue_styles' );
add_action( 'enqueue_block_editor_assets', 'draupnir_9_enqueue_styles' );
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri() . '/style.css'
);
}Can path be relative and relative to what? To root or theme root? So since style is in theme root, the above link should be accurate? /style.css. Do I remove slash?
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effectIt already says: get_stylesheet_directory_uri()
First line. Does it bring stuff to the editor?
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effect@threadi So this works out of the box?
function get_stylesheet_directory_uri() {
$stylesheet = str_replace( '%2F', '/', rawurlencode( get_stylesheet() ) );
$theme_root_uri = get_theme_root_uri( $stylesheet );
$stylesheet_dir_uri = "$theme_root_uri/$stylesheet";
/**
* Filters the stylesheet directory URI.
*
* @since 1.5.0
*
* @param string $stylesheet_dir_uri Stylesheet directory URI.
* @param string $stylesheet Name of the activated theme's directory.
* @param string $theme_root_uri Themes root URI.
*/
return apply_filters( 'stylesheet_directory_uri', $stylesheet_dir_uri, $stylesheet, $theme_root_uri );
}And does it enque for editor?
Please consider to adhere to theme colors, buttons, fields, shadows, outline, border design vs. designing own style. That way WP Forms adapts when a theme upgrades. IMHO it makes no sence that a plugin tries to be a theme. Also it is code in exess…
API version 3 do you mean Schema Version 3 or?
So you are compatible with Schema 2? And have theme.json in place there?
let me ask again. In my inspector I see a lot of variables for WP Forms declared! A full color palette and much more. Where are these coming from?
if I style your button to behave as core button, what is the css to do so?
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effectI can confirm css is still not working. I resides in root of child theme. Not parent theme…
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effectSo something like this? It’s in root of child theme. I see before this addition that effect is there on site 2, 3 etc but not on main site…. This is incredibly confusing…? Anyways is this code exactly what I need?
add_action( 'wp_enqueue_scripts', 'draupnir_9_enqueue_styles' );
add_action( 'enqueue_block_editor_assets', 'draupnir_9_enqueue_styles' );
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri() . '/style.css'
);
}Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effect@threadi I’m back
style.css still takes no effect. I am adding non supported styling in theme.json to styles.css. The below does not show. When moving this to code snippets it works. So why is style.css not working. Your code above is in functions.php
/*************************************************************************************************/
/************************************* Draupnir 9 - Child Theme **********************************/
/************** Fallback CSS - Some of this will eventually move into theme.json *****************/
/*************************************************************************************************/
/****************************************************************/
/******************* New Funky Forms - Global *******************/
/****************************************************************/
/************* Forms Text Shadows - No support in version 3 *****************/
.wp-element-button,
.wp-block-button__link {
text-shadow: 1px 1px 1px var(--wp--preset--color--base-2);
color: red;
}Forum: Plugins
In reply to: [SearchWP Modal Search Form] styling the X to remove txt in search fieldThx @kjswp
To whom it may concern:
This is adapted for Twenty Twenty Four. It adds a circle icon behind the X to create contrast in almost any environment. There is some stuff for light and dark theme if required. Color variables pull from WordPress default colors to adjust to any block theme.
/************* Search Fields - Light & Dark Themes (Not active) *****************/
input[type="search"].theme-dark {
background: var(--wp--preset--color--contrast-2);
color: var(--wp--preset--color--base-2);
}
input[type="search"].theme-light {
background: var(--wp--preset--color--base-2);
color: var(--wp--preset--color--contrast-2);
}
/************* Search Fields - The Reset X to delete entered text. Let's insert an icon background for contrast *****************/
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
height: 1em;
width: 1em;
border-radius: 50em;
background: url(https://pro.fontawesome.com/releases/v5.10.0/svgs/solid/times-circle.svg) no-repeat 50% 50%;
background-size: contain;
opacity: 0;
pointer-events: none;
}
input[type="search"]:focus::-webkit-search-cancel-button {
opacity: .3;
pointer-events: all;
}
input[type="search"].theme-dark::-webkit-search-cancel-button {
filter: invert(1);
}Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effect@threadi Thx Threadi
That hopefully works. I will do some testing later today. For now I am marking as resolved. Thx
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effectBoth crashed my site. So now I have only the latest you sent. Correct?
Forum: Fixing WordPress
In reply to: Child Theme style.css takes no effect@threadi So I need both of these? One displays style.css stuff on the frontend and the other in the editor?:
add_action( 'wp_enqueue_scripts', 'draupnir_9_enqueue_styles' );
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri()
);
}
add_action( 'enqueue_block_editor_assets', 'draupnir_9_enqueue_styles' );
function draupnir_9_enqueue_styles() {
wp_enqueue_style(
'draupnir-9-style',
get_stylesheet_uri()
);
}Forum: Themes and Templates
In reply to: [Twenty Twenty-Four] Featured Image Caption in Post TemplateHi @4thhubbard
Thank you so much for your effort. I just ran a test on snippet above and it appears no caption is showing. I believe this is legacy or maybe because I am using cover block in my template to show the featured image.Feedback for developers:
Image block can display Caption. Image block can not show featured image. Hence, it is not usable in templates to show featured together with a caption of credits.
Featured image block does exactly that. It cannot show caption, hence, in templates the featured image is not credited. At times that is a requirement to be allowed to use a given frame.
Cover block no caption either. How about one size fits all? for usability in templates.
Plugin:
Comes across as somewhat legacy oriented. I might give it a try, but I am reaching plus 70 plugins, so I am making all efforts to rewind that
Thx