Questions tagged [styles]

The tag has no usage guidance.

0
votes
1answer
17 views

Are there any CSS classes for the wordpress colours?

Are there any CSS classes for the wordpress colours: https://make.wordpress.org/design/handbook/design-guide/foundations/colors/ For instance, classes like these from the Twenty Seventeen Theme: ....
0
votes
0answers
30 views

Plugin to style post Excerpts

So, I have a site that is running Tom's WP Show Posts and I have it set to show the excerpt of a post. I am styling the excerpt with some preexisting WordPress CSS classes and using JavaScript to ...
1
vote
1answer
39 views

Custom gutenberg block not rendering with styles on frontend

I've registered a custom block that's basically a wrapper for other content with some background color options. Here's my registration code on the backend: function mytheme_register_box_block() { ...
0
votes
0answers
19 views

List All Enqueued Scripts and Styles

Is there any way to list which scripts and styles have been enqueued, while within wp-admin? For example this code works, but only if you are on the frontend. How could I get the same list while ...
0
votes
0answers
19 views

Save custom css class (and data) to core/columns block

I wish to add/change class for this div: <div class="wp-block-columns has-2-columns"> There is no possibly to use "wp.blocks.registerBlockStyle" because it doesn't work for core/columns blocks ...
0
votes
1answer
296 views

Override theme style rule in Gutenberg

I have a theme that adds the following CSS rule inline through the Customizer to style the hover state of links in post content: .entry-content a:hover { color: <color selected in the ...
0
votes
1answer
54 views

How to disable all css from the theme for a specific post type page

I´m creating a plugin and I need, when the admin is logged in and a single-{post-type-slug}.php does not exist, the page https://my-site/post-type-slug/my-admin-page.php can be displayed without ...
0
votes
0answers
16 views

I can not change the background-color value of wp: meta_value of content.xml

I can not change the background-color value of <wp: meta_value> I'm trying to change by css the value of background-color in the class that is automatically generated by the Visual Composer ...
0
votes
1answer
130 views

WooCommerce Storefront site-header padding

Can someone please point me what folder/file location of where this precise bit of padding-top definition comes from other than style.css? I can't seem to find any sass/scss files in any of the ...
0
votes
1answer
33 views

How to add styles in existing function?

The goal is to add some internal styles to a function. The function has some if statements, and then it does: $content .= " <div> <h3>stuff</h3> <div>$additional_stuff&...
0
votes
1answer
21 views

How to make a difference between the portfolio list, and a portfolio item?

I am using the portfolio possibilities of WordPress and I am trying to change the style. However, in the list (the one that I see at site.com/portfolio) I see that the article element has the same ...
1
vote
0answers
28 views

Styles and scripts inside template part

Is there anything wrong with including style and script tags inside a template part? The template part which I'm using like something more similar to a vue/react component is working correctly but ...
0
votes
1answer
29 views

the_excerpt displaying code inside style tag

I created a custom visual composer element where I included a style tag on it to use the chosen color to create hover effect. And this code is now displaying in the the_excerpt in the search result ...
0
votes
1answer
19 views

Full list of registered scripts or styles, but from an admin options page

I'm developing a plugin that will allow some CSS optimization. But first of all, i need to get the list of all stylesheets (later i'll do something for scripts too). Doing this: function ...
2
votes
1answer
16 views

Unable to load stylesheets and scripts to plugin settings page

I have the following code in my main plugin file: <?php /* Plugin Name: Awesome Slide Show */ add_action('admin_head', 'wp_ss_plugin_include'); add_action('admin_menu', '...
1
vote
1answer
19 views

Is there no admin ui guide for 4.x?

I'm starting a plugin project, and I want to keep the admin pages consistent with the rest of the admin in regard to styles and elements. However, I can't seem to find any resource that lists default ...
0
votes
0answers
13 views

how to get the styles that wordpress used for products in the canvas of an editor?

am using an editor (grapesjs), here i want to get the styles that wordpress used for products inside of the editor. am getting the products in canvas but not the exact styles. how can I get that in ...
0
votes
0answers
26 views

Dynamic styles depending on form selection Wordpress Multisite

I have a registration form for sites in my Multisite. My plan is to change minimal CSS styles in every site depending on the option that the user selected in a select that is in the registration form. ...
1
vote
1answer
29 views

WordPress plugin output formatting

I'm currently working on my very first Wordpress plugin, and it is coming along nicely. I do have one question about the formatting of the generated output. At the moment, the plugin outputs a table ...
0
votes
0answers
23 views

How do I change the content of an element for a theme without losing the styling?

For example the theme I am using has a built in "coin calculator" that displays live prices for cryptocurrencies to fiat. It looks like this: When I go to edit the page the code for this is just a ...
-1
votes
1answer
283 views

Woocommerce align prices and texts [closed]

Is it possible to align prices and product titles in grid view. If i have a product with one line title I want its price to go lower so it aligns with the price of the 2 or more line product title. I ...
-2
votes
1answer
76 views

Site navigation sits unstyled for a second on page reload [closed]

To clarify a bit - i've styled the main navigation on my site by selecting its class, and going down the hierarchy from there. At a random point in development it started appearing completely stripped ...
0
votes
1answer
732 views

Displaying POST content with HTML tags and all

The following code allows me to display the post TITLE and content fine, but the content is not displaying as I see it on POST EDITOR. Here's the webpage where the PHP is rendered: http://queridas....
0
votes
1answer
97 views

Using custom HTML tags to WordPress [closed]

Similar to, for example, <blockquotes>, I also work with, for example, custom <blocktips> styled with :before and :after elements to be used regularly on a site. After styling, these are ...
0
votes
1answer
373 views

Register and enqueue style.css custom theme

I'm trying to create a custom theme for wordpress, I created all these file: style.css index.php function.php footer.php header.php page.php single.php front-page.php This is the code of my style....
3
votes
1answer
407 views

Apply custom style to single word in Wordpress

I'm setting up a WordPress site for a client. They need to be able to hide individual words through the WYSIWYG editor, which will be revealed upon a click. I've set up a new custom style format in ...
-1
votes
1answer
28 views

Wordpress doesn't respect “ver” parameter in styles [closed]

My Wordpress server prints the enqueued styles without version parameter, making them cached forever. My local installation prints the styles as they should look, with "ver" intact. Does not matter if ...
1
vote
1answer
792 views

An unwanted inline style is added to my body tag

I have made my theme and installed it on my host, but there is a problem with my body tag. it gets an automatic inline style which looks like below in Google Chrome: <body style="">&#65279;&...
0
votes
1answer
68 views

Wordpress menu issue after update

INHERITED WEBSITE - I'm taking over an existing Wordpress website (prepwellness.org) and I noticed several things wrong with the Wordpress GUI. 1) It didn't have a "Posts" option in the left ...
0
votes
2answers
640 views

Custom admin bar css on front end bug

I want to apply my valid custom admin bar color scheme to front-end toolbar. I am using this code to do it: add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'color-admin-...
-1
votes
1answer
26 views

Problem with float:left - unexpected behavior [closed]

Here you can see the problem with floating:left in my page. I have made a style for wordpress, where I have links to pages and children pages. The links "PC a internet, Grafika, Programování" should ...
0
votes
1answer
23 views

Problem with positioning of the menu in custom WP style

I have created a style with fully functional menu in the header. The header ends with the border-bottom. When I add following lines to style.css to change the menu appearance: .site-nav ul li { ...
1
vote
1answer
56 views

Enqueue Style Only On Certain Pages Not Working

I am trying to enqueue Bootstrap's CSS only on two pages. Here's the code I have in my functions.php file: function bootstrap_css() { if (is_page('who-we-are-2') || is_front_page()) { ...
0
votes
1answer
65 views

Can't change the style of a submit input type? [closed]

I have a membership plugin which makes a custom login page. I want to change the hover style for the submit button. I tried to inspect the element to know which style i should change but i can't find ...
4
votes
2answers
64 views

Is this the best (and only) option to style CSS for a given post type?

First of all thanks for reading, and my apologies for my lack of knowledge. I have a WP site running with a theme and a child theme. I run it in 3 languages Spanish, English and Portuguese; and for ...
0
votes
2answers
62 views

Theming global variables - initializing in index.php but using in header.pho

I need to initialize some variables in various templates (index, single, page) such as banner image of that page. But then use that value in the 'get_header()' template. A good example of this is the ...
0
votes
2answers
449 views

Publish, Save Draft and Preview buttons do not work after being moved with jQuery

I'm trying to change the layout of the post-new.php page and as part of this I would like the publish, save draft and preview buttons below the form rather than to the right. So in my plugin js file ...
0
votes
1answer
74 views

Is it good practice moving the main stylesheets after the plugin styles?

currently I deleted the 'classic' hardcoded main /styles.css from header.php and enqueued it from a wp_enqueue_scripts action. Basically, the loading order in header I currently want (and have) is: [...
0
votes
1answer
2k views

wp_enqueue_script was called incorrectly Issue when active plugins of WordPress Admin Bar Improved

I am getting the error with the following message when i active my plugins "WordPress Admin Bar Improved": Notice: wp_enqueue_script was called incorrectly. Scripts and styles should not be ...
0
votes
1answer
129 views

Remove header title form page through CSS [closed]

I would like to change the size of the message on my shopping-cart page, for example: http://leerenveerkracht.nl/2016wp/?page_id=4912 If a product is added, there a large message appears (...
0
votes
1answer
55 views

Not all CSS elements transferring via parent to child?

before I begin I apologize if I have terrible English as it is not my primary language. I am trying to create a child theme for a website I am working on. The website uses Comicpress theme. I have ...
0
votes
1answer
43 views

Styles and Scripts, Selectively enqueue across entire site

Right I have a plugin I am making for a customer, this plugin is actually to display things on a window TV display they have which will connect to a webpage not linked publicly on the website. I am ...
9
votes
3answers
11k views

How can I get a list of all enqueued scripts and styles?

I'm creating a plugin and I want to get the list of all scripts and CSS used by other plugins. This is my function: function crunchify_print_scripts_styles() { $result = []; $result['...
0
votes
2answers
461 views

Ideal inline dynamic CSS injection

There is a code in here that dynamically load custom script. <?php function my_styles_method() { wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/css/...
0
votes
1answer
284 views

Set a link in child theme style.css to jump to #main [closed]

I have created a 2013 child theme by creating these 2 files - /wp-content/themes/twentythirteen-child/style.css: @import url("../twentythirteen/style.css"); .site-header .home-link { min-height:...
1
vote
2answers
84 views

How do I load custom scripts and styles for a page?

Different pages often need different set of scripts and styles for them. I use functions.php and construction like this to load scripts and styles: function load_assets() { wp_enqueue_style( '...
0
votes
1answer
1k views

How to get WordPress to accept the <style> tag in articles (or other alternatives)

WordPress (i.e. TinyMCE) automatically strips the <style> tag from articles in newer version. This means, you can only rely on inline CSS which makes the code ugly for more complex styling ...
1
vote
2answers
2k views

Enqueued Stylesheets Effecting Admin Styles

I'm building a custom theme for a client and I've been adding stylesheets incorrectly for a while, so I decided to do it the correct way :-). However, when I add the stylesheet to my functions.php ...
0
votes
1answer
121 views

Is there a way to add additional CSS styles to the styles css file dynamically?

I would like to add additional styles to the styles.css file before it is sent to the client. Is this possible? Currently styles.css contains : /* Theme Name: My Theme Theme URI: https://example....
0
votes
2answers
91 views

Style WP_Debug?

Is there any way to style the message delivered by wp_debug? Whenever I set WP_Debug to true, it pushes all my content down the page. While I admit it's easy to just set it back to false after using ...