Questions tagged [css]

Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of HTML output, usually via Themes. When you have to use this tag, then there's a high chance that your question is off topic on this SE network site.

811 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
1 answer
142 views

@wordpress/create-block image url in css

how to include image URL to css "style.css" in custom block? Both these not work: background-image: url("images/imagename.png"); background-image: url("./images/imagename.png&...
pouzarm's user avatar
  • 41
3 votes
0 answers
784 views

Remove WordPress/Gutenberg button styles for ACF blocks

Is there a way to remove the default styling of the gutenberg editor? I am building a custom theme using ACF blocks, part of one of the blocks has a button that is being displayed from the template ...
FroggaByte's user avatar
3 votes
3 answers
2k views

Relative path instead of absolute for wp_enqueue_script

When you enqueue scripts or styles with the following: function themeslug_enqueue_style() { wp_enqueue_style( 'core', '/style.css', false ); } add_action( 'wp_enqueue_scripts', '...
Troy Templeman's user avatar
3 votes
2 answers
536 views

How can I enqueue a style only when a particular widget is active?

I have a plugin which requires a style sheet for the widget. I am trying to register the stylesheet when the widget is created, however the style sheet is not being queued and the styles ignored. The ...
SelketDaly's user avatar
3 votes
0 answers
262 views

Change Theme from Plugin based on query_vars

I'm working from about 4 months on developing a Plugin. This plugin make in a page an entire app, using the powerful of Wordpress. So, I've decided to create a serires of rewrite rules using command ...
Klode's user avatar
  • 131
3 votes
2 answers
2k views

What is better way to use Bootstrap inside admin panel?

I need to use Bootstrap CSS for better UI in wp-admin but if I enqueue the bootstrap.css, it's affecting the admin default UI by changing background colors, etc. How can I use bootstrap.css inside wp-...
Bhavesh Nariya's user avatar
2 votes
1 answer
1k views

Block content rendered with inline CSS. How do I reuse it in a headless setup?

I'm working on a Headless Wordpress setup. I want my Wordpress posts rendered elsewhere. I want to write these posts using the basic Gutenberg block editor, and show them on a separate non-Wordpress ...
ᴍᴇʜᴏᴠ's user avatar
2 votes
0 answers
18 views

Is there CSS to expand the gallery limit on Index Pages?

On a wordpress index page, I am only allowed to add 12 galleries. I would like to add many more. Is there a way that I can expand the gallery limit allowed on index pages? If this is not possible, is ...
Rhino_Kadabra's user avatar
2 votes
1 answer
214 views

Can you edit WP gutenberg block css without a plugin?

I want to add custom css to my gutenberg table block. I want to adjust the css width of the tds. Ive tried selected the "Fixed Width table cells" toggle but the table seems to have different ...
sarah's user avatar
  • 21
2 votes
0 answers
621 views

Wordpress 5.8 update problem custom theme styles are overridden by core styles common.min.css

After the automatic update to wordpress 5.8 today one of my custom themes displayed wrong styling in the frontend for custom webfonts, colors, font-sizes and other styles. After a quick check in the ...
Vortac's user avatar
  • 304
2 votes
1 answer
112 views

Can the Theme Customizer be used to generate static/cachable CSS, and how?

I am currently trying to make a customizable Bootstrap theme for my personal WordPress site, however, I am running into some issues. Bootstrap can be customized by modifying the SCSS variables, and I ...
Kitty Cat's user avatar
2 votes
1 answer
240 views

Dequeue theme stylesheets but keep widget styling on custom page template

Bit of an unusual one. I have created a plugin that will only display content on a custom page template. For this reason, I have dequeued all the theme styles via $wp_styles and loaded in the plugin ...
scopeak's user avatar
  • 213
2 votes
1 answer
70 views

WordPress default theme css units

Is there a specific rule the default WordPress themes follow for CSS units? I see em's on some font sizes and rems on others and px on certain places. Referred the following links but I couldn't ...
AashikP's user avatar
  • 75
2 votes
1 answer
598 views

How to make float element in tinymce

I would know how its possible to add a float:left or float:right in tinymce ? I know how to do this for a picture but what is the best solutions for all elements ?
KeizerBridge's user avatar
2 votes
2 answers
1k views

custom css for admin only

I need custom CSS for admin. So if user is not logged in or is anything else but admin there is one CSS, and for admin only different CSS. I tried this code in functions.php: function ...
Petra Žagar's user avatar
2 votes
1 answer
779 views

Extending content width with twentyfourteen theme

I'm using the twentyfourteen theme and have successfully removed the content (right) sidebar. However, I now want to stretch my content to cover the space left by removing that sidebar. I have added ...
cag8f's user avatar
  • 1,897
1 vote
1 answer
16 views

Calling a PHP function from a menu item

Please forgive this totally newb question. I'm not a dev, and I'm a little too far that I can deal with right now... I'd like to add a link to the WooCommerce cart page using the cart icon from my ...
Patrick's user avatar
  • 11
1 vote
0 answers
17 views

Load RTL CSS using block.json for block development

I am developing a block using block.json and I could load RTL CSS on backend using this code: // Check if RTL mode is enabled if (wp.i18n.isRTL()) { // Import RTL stylesheet if RTL mode is enabled ...
Farhad Sakhaei's user avatar
1 vote
0 answers
37 views

Gutenberg inline style messing up the navigation when I add a list to a page

This is sort of weird. I have a set of pages and the navigation looks the same on all but one page. After trial/error I was able to narrow it down to having a list on my page. As soon as I add a list ...
J.P.'s user avatar
  • 11
1 vote
1 answer
97 views

Problem with spacing sizes in theme.json

I often use the following code in theme.json to define predefined spacing: "spacingScale": { "steps": 5 }, "spacingSizes": [ { "size": "min(...
Dominik's user avatar
  • 11
1 vote
0 answers
34 views

Full Site Editing Non-editble global styles?

Working my way through learning FSE, I'm using this this article and wondered what to do for global styles you don't want user control over? Previous this would be controlled via style.css however, it ...
user4630's user avatar
  • 245
1 vote
0 answers
16 views

How to create a "Most Popular" & "Latest" TAB in Wordpress

On my gaming website, I upload videos to the website, which is on the homepage of the website. The problem is, that I need to add a "Most Popular" tab & "Latest Videos" tab, ...
CandyShop's user avatar
1 vote
3 answers
407 views

Insert a group block inside a list item

It seems like the only thing you can put inside a list item is text (including links), inline images, and lists. But I would like to insert a whole group of blocks inside a list item. I was able to do ...
Emmanuel's user avatar
  • 111
1 vote
0 answers
31 views

Sorting Problem

I tried to change the Functions.php to this code add_filter( 'terms_clauses', 'wpse247680_terms_clauses', 10, 3 ); function wpse247680_terms_clauses( $pieces, $taxonomies, $args ) { // ...
Miguel Andrade's user avatar
1 vote
0 answers
338 views

How to add my theme's style to woocommerce blocks?

I have found plenty of articles on how to remove the styling from the Woocommerce blocks, but I can find nothing about how to actually use your theme's styling to replace the removed styling from the ...
Seth's user avatar
  • 11
1 vote
1 answer
693 views

WordPress 6 - inline container styles breaking my site

I just upgraded a project to WordPress 6.0.1, and now have load of wp-container-* inline styles injected which are breaking my site: <style>.wp-container-2 {display: flex;gap: 0.5em;flex-wrap: ...
codewithfeeling's user avatar
1 vote
1 answer
122 views

Unable to locate inline CSS causing parts of page to be blank

Large parts on a live Wordpress page shows blank because a piece of inline CSS has opacity set to 0. Unfortunately I am unable to find where this inline CSS lives. <div class="grve-element ...
bart's user avatar
  • 225
1 vote
0 answers
41 views

Style internal links based on the tags of the linked post

When I internally link to one post in the body of another, I’d like the link to be styled based on the tags that the linked post belongs to. For example, say I have tags “good” and “bad”. When I link ...
Avery's user avatar
  • 11
1 vote
0 answers
194 views

How to override Bootstrap css with my child theme css in wordpress?

I am trying to load my site's child theme's css after Bootstrap CDN css in wordpress. I tried using these code but it doesn't work. The Bootstrap css is not overriden. What should I do to fix that? ...
wcwc's user avatar
  • 11
1 vote
0 answers
1k views

How to stop Gutenberg from outputting inline CSS for specific blocks?

I like to know how I can remove these individually. <style id='wp-block-separator-inline-css'> @charset "UTF-8";.wp-block-separator{border-bottom:1px soli ... </style> WP has a ...
NextGenThemes's user avatar
1 vote
2 answers
399 views

Completely Disable Wordpress RSS Feeds

There are loads of articles out there on how to completely disable Wordpress RSS feeds, my configuration (functions.php) is: function disable_feed() { wp_die( 'You Died' , 200 ); } add_action('...
David Adams's user avatar
1 vote
0 answers
179 views

Load CSS before Theme CSS

I have a stylesheet I want to load first in the head before other plugins load css or theme css. For some reason priority is not working for me. Any idea how I can achieve this? I need to use ...
Ads's user avatar
  • 11
1 vote
0 answers
124 views

How to check if a WordPress core block is active in sidebar

I have a widget area and I want to enqueue a stylesheet only if a core block is active in it. I tried the following code: // if has audio block. if (has_block('audio')) { wp_enqueue_style('audio-...
Zeddy Emy's user avatar
1 vote
0 answers
51 views

Load in wp admin assets from child theme

I started to create a child theme from a BoldThemes theme with custom icons. I am able to see icons when edit directly page, but when try to edit page from wp admin, I've this issue I discovered ...
salsan's user avatar
  • 121
1 vote
0 answers
8 views

Add fields in customization tab to change background colours of certain classes

I'm maintaining a Wordpress theme for a website that has an annual style change. Nothing fundamental, a few images get switched out and the colour scheme changes as well. The theme uses a pallette of ...
IneptusMechanicus's user avatar
1 vote
0 answers
63 views

Getting page output HTML without request (for CriticalCSS, PurgeCSS)

I work a lot with legacy website with css files which were shared across many pages which resulted in really bloated stylesheets shipping to browser. I want to do some performance tricks to avoid this ...
jamkaka's user avatar
  • 11
1 vote
1 answer
33 views

Adding code to child's theme css and php cannot override certain elements

I've installed the twenty eleven theme and created a child theme based on it. I copied the entire style.css from the parent theme with all the changes I want to the child theme's css and most of the ...
Rach_L's user avatar
  • 11
1 vote
0 answers
519 views

Hot reload failing to update file changes

I have been trying to get my wordpress project to use hot reload, but when changes are made to my files, nothing is changed/updated. I initially had it executing like this from my functions.php file: ...
Krys's user avatar
  • 135
1 vote
0 answers
20 views

Help with child theme enqueuing additional css files

A few years back, I made some css and template changes directly in my parent theme, because Wordpress was new to me and that seemed easier than messing around with this child theme stuff. It worked ...
Ray Kremer's user avatar
1 vote
0 answers
44 views

How to include .css code in a WordPress page template?

I have set up a template on my Wordpress.org website that will apply some .css code to hide the header, footer and breadcrumbs on my landing pages. I've created a css folder in my child theme, created ...
Sorin Pascu's user avatar
1 vote
0 answers
32 views

Which html elements should be styled in wordpress theme

At the Wordpress Codex said next: All possible HTML elements should be styled by your theme (unless it is a child theme), both in post/page content and in comment content. Tables, captions, images, ...
Volodymyr's user avatar
1 vote
0 answers
38 views

Responsive Author Style in BBpress?

I would like change responsive design author of forum section which I attached screenshots. I tried some of code but didn't worked. Here is the code #bbpress-forums li.bbp-body div.bbp-topic-author, ...
Kaan Burak's user avatar
1 vote
0 answers
55 views

Link theme options page using ACF to styles

Forgive me, I'm very much a beginner. I'm looking into custom theme development and creating a theme options page. Using the options page, I want to set a primary color that will be used across all ...
Cobyfoster99's user avatar
1 vote
0 answers
27 views

Custom CSS doesn't work in edit mode

I'm using Wordpress 5.6.1 with Twenty Twenty-One theme. I have added some additional CSS and it works fine for published posts. But it does not apply while I'm editing a post. In Chrome web ...
Elliott B's user avatar
  • 111
1 vote
1 answer
74 views

Change via CSS the color of social menu icons

my page is this one and I want to change the pinky color of the icons for another one. I have try several ways in here but I can't.
Paula's user avatar
  • 111
1 vote
0 answers
205 views

Auto LTR-RTL Text Direction in wordpress post!

How can make wordpress auto direction to language detected and switch it automatically Example: when i use facebook app or website i usually use it in English language LTR but when I write something ...
Ihab Taha Murad's user avatar
1 vote
1 answer
538 views

Remove transparancy in Sydney theme's headerimage

I'm bulimg a Wordpress site on the Sydney theme. On some pages the header image is kind of transparent. Not on the start page, but on all the other sites (example here: https://www.ferienhof-rauchhaus....
M.Friedrich's user avatar
1 vote
0 answers
29 views

Save changes in CSS after removing Menu from specific page

I am completely new to WordPress and just succeeded in removing the Menu bar from specific sites. For this purpuse I used .page-id-xxx .site-navigation - primary-navigation{ display: none; } ...
Nadine M.'s user avatar
1 vote
0 answers
46 views

show content of a page built using yootheme builder on different page/template

I have a WordPress page built using Yootheme builder. I want to show the content of that page on woocommerce Category page. namespace YOOtheme; global $post; $post = get_post(2434); setup_postdata( $...
Div's user avatar
  • 11
1 vote
0 answers
37 views

Bootstrap in theme

I've programmed a theme before three years and I want to update it with Bootstrap. I need the input groups, modal windows and some other features. Now I have implemented it and it works! But one thing ...
mw197's user avatar
  • 11

1
2 3 4 5
17