Forum Replies Created

Viewing 15 replies - 16 through 30 (of 690 total)
  • Thread Starter hebhansen

    (@hebhansen)

    @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.
    Thread Starter hebhansen

    (@hebhansen)

    @iodic Theme says the same. Ask Woo, so here I am. Who saw this happen before?

    Thread Starter hebhansen

    (@hebhansen)

    Script 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?

    Thread Starter hebhansen

    (@hebhansen)

    It already says: get_stylesheet_directory_uri()

    First line. Does it bring stuff to the editor?

    Thread Starter hebhansen

    (@hebhansen)

    @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?

    Thread Starter hebhansen

    (@hebhansen)

    This is what I mean

    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…

    Thread Starter hebhansen

    (@hebhansen)

    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?

    Thread Starter hebhansen

    (@hebhansen)

    I can confirm css is still not working. I resides in root of child theme. Not parent theme…

    Thread Starter hebhansen

    (@hebhansen)

    So 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'
    );
    }
    Thread Starter hebhansen

    (@hebhansen)

    @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;
    }

    Thread Starter hebhansen

    (@hebhansen)

    Thx @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);
    }
    Thread Starter hebhansen

    (@hebhansen)

    @threadi Thx Threadi

    That hopefully works. I will do some testing later today. For now I am marking as resolved. Thx

    Thread Starter hebhansen

    (@hebhansen)

    Both crashed my site. So now I have only the latest you sent. Correct?

    Thread Starter hebhansen

    (@hebhansen)

    @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()
    );
    }
    Thread Starter hebhansen

    (@hebhansen)

    Hi @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

Viewing 15 replies - 16 through 30 (of 690 total)