Tag Info

New answers tagged

-1

I think there is another css class with same name or any other inherited css property get priority. you can use !important after the css property value and before the semicolon ( ; ).


1

Use the function body_class() in your templates: <body <?php body_class(); ?>> This creates extra classes on the body element. Then filter its values in your functions.php: add_filter( 'body_class', function( Array $classes ) { if ( $GLOBALS[ 'isBoxedLayout' ] ) $classes[] = 'isBoxedLayout'; return $classes; }); Now you ...


0

If you're trying to show content beneath admin bar (and I am assuming this is the reason you wanna get rid of admin bar). Have you consider pushing your page down 32px, since body tag has logged-in class that you can use this code to push content down and keep admin bar: body.logged-in: margin-top:32px;


0

Add This to your function.php it hide the admin bar from frontEnd add_action('after_setup_theme', 'remove_admin_bar_user'); function remove_admin_bar_user() { if (current_user_can('administrator') || is_admin() ) { show_admin_bar(false); } }


0

WordPress has a function called wp_get_referer() that you could use to do this. Codex link $page_referrer = wp_get_referer(); if ( $page_referrer == 'campaign-1-url') { // Campaign 1 css } You'll have to craft the conditional statement to fit yours needs.


1

You can use wp_add_inline_style to attach some css to dashicon style. Using that function everytime you add dashicons css via wp_enqueue_script you can automatically append some css and so modify default styles. Something like: add_action('wp_enqueue_scripts', function() { wp_add_inline_style( 'dashicons', '.dashicons { ...


0

I took a look at Bootstrap's Glyphicon CSS and WordPress's Dashicon CSS and formulated a tweak. Bootstrap Glyphicons CSS .glyphicon { position: relative; top: 1px; display: inline-block; font-family: 'Glyphicons Halflings'; font-style: normal; font-weight: 400; line-height: 1; -webkit-font-smoothing: antialiased; ...


1

You can use em sizing to make the dashicons scale relative to the font size of their containing element. This should do the trick: .dashicons:before { width: 1em; height: 1em; font-size: 1em; } Then if your <h1> element has a font-size of 48px, your dashicon will as well.


0

As I mentioned in my comment, the dashicons are meant to be part of the dashboard menu, as such they are sized very specifically: .dashicons-before:before { display: inline-block; width: 20px; height: 20px; font-size: 20px; line-height: 1; font-family: dashicons; text-decoration: inherit; font-weight: 400; font-style: ...


2

Technically speaking all you need is the Theme Name in your stylesheet header. This will identify your theme. All the other info is need-to-know info and can be omitted. If your theme is a child theme, you will need to have Template as well as this will be the path to the parent theme.


0

No, unfortunately this is inherent limitation of PHP templates used in WordPress natively. You will have to override either this template file, or file(s) which include it, but in any case something will have to be replaced on whole file scope. There is no clean way to load template file partially in WordPress, which is handled by template inheritance ...


1

In the latest version of WordPress, there a text color option in the default WYSIWYG, which is TinyMCE. Look for this option: Custom styling for tables is not supported by default in WordPress.


1

The hooks are fine for change the login style. I think is better idea to identifier, why is the load so much slow. I have a lot of change for different installs and no problems with this hooks. But I see also often a lot of loads of unused source. I change the login style with this class: ...



Top 50 recent answers are included