All Questions
Tagged with css plugin-development
79 questions
0
votes
0
answers
28
views
Problem with inline style CSS properties issue on DIV
I am building a custom dragable interface where user can build form and drag elements. I am facing issue with inline style properties. The example html is given below
$content = <div style= "...
1
vote
0
answers
268
views
how to add contact form 7 shortcode in javascript variable [closed]
In Contact Form 7 I have created a dropdown with 3 options under it "Dallas" "Houston" "Austin" . I wrote this js code so that if I select Dallas then "Houston" ...
1
vote
0
answers
18
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, ...
0
votes
1
answer
422
views
How can I avoid conflicts between plugin and theme?
I'm developing a widget for wp elementor as a plugin. Now my widget front view css and the theme front view css are in conflict. Right now as a developer how can I avoid wp plugin front view css and ...
0
votes
1
answer
42
views
Themes conflicts and overrides my WordPress Support widget Plugin styles
The front end of the widget plugin has the widget launcher and once opened, it shows the actual widget with its elements. it has lots of styling issues which are 100% from whichever theme is currently ...
27
votes
5
answers
28k
views
How do I add CSS options to my plugin without using inline styles?
I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
0
votes
2
answers
822
views
how to add custom css at top above all css file for specific url
i want to add my css file bootstrap.min.css on top of all css file. I used below code
wp_enqueue_style( 'bootstrap_css', 'bootstrap.min.css' );
but it add css below theme css file .
Issue is that ...
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-...
0
votes
2
answers
969
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
1
answer
46
views
Why my theme's css not working on another site
I work on my on theme based on Neve theme. First I had problem with scripts, because not working but i had to change their location from footer.php to header.php to everything was good.
New some ...
0
votes
1
answer
137
views
How to add some basic inline CSS using existing plugin or theme?
Sometimes you have a theme or a very lightweight WordPress plugin (like a single PHP file) and you want to add some CSS easily without having to load more files or folders, etc.
How can you add some ...
0
votes
0
answers
30
views
WordPress plugin development theme issue
Developed the WordPress plugin using https://materializecss.com/ framework , Once plugin activated it will automatically create 4 pages in WordPress. Here I'm facing one issue with WordPress multiple ...
0
votes
1
answer
560
views
How to Change CSS Colors from Custom Plugin Settings Page
I have a custom WordPress plugin with a variety of settings that I use across multiple websites. I also use a few of the same 3rd party plugins across all of those pages. I would like to be able to ...
0
votes
0
answers
24
views
Two plugins using the same CSS id
I have two plugins that use the same CSS id, in this case id="TB_ajaxContent" which I guess means that those two plugins use the ThickBox widget to display things in a popup blackbox.
One of ...
0
votes
0
answers
252
views
Twenty-seventy theme remove additional CSS from head
Is it possible that additional CSS that we add in customizer section, display somewhere else instead of head? I am using twenty-seventy theme. I know its fetch and rendering code is available in wp-...
2
votes
1
answer
4k
views
How to display a value from a radio button in the options menu in wordpress
I'm a little stumped on this one. I'm not very experienced when it comes to PHP, but I have figured out how to display a value inputted from a text box. I'm now trying to do the same with a radio ...
0
votes
0
answers
265
views
Why does theme's reset CSS have higher precedence of plugin's CSS?
In the style.css of the theme Twenty Twenty-One, there is a piece of reset CSS:
/**
* Reset specific elements to make them easier to style in other contexts.
*/
html, body, p, ol, ul, li, dl, dt, dd,...
0
votes
1
answer
49
views
Images under 1MB are not being compressed
Images that are above 1MB get automatically compressed on upload.
Images that are smaller than 1MB are added to the database in their raw form.
So, if someone uploaded a 900 KB image, the post will ...
0
votes
1
answer
3k
views
How to insert HTML/CSS/JS into my iframe plugin?
I currently have an iframe plugin that displays on a WordPress page by shortcode. Currently I have been displaying websites in my iframes "src" but I recently came across an issue to display my very ...
2
votes
1
answer
6k
views
Add CSS animation as Preloader to WordPress
I found a CSS animation snippet on Codepen, and would like to add it in my WordPress site for preloader animation, but I couldn't find any related help or plugin that would allow me to add a Preloader ...
0
votes
1
answer
24
views
plugin dev - minimum base css specificity?
I'm developing my first really major wordpress plugin and I'm not sure how to approach specificity.
I want to avoid inline styling completely yet I want to ensure my css declarations aren't interfered ...
2
votes
1
answer
3k
views
wp_enqueue_style built in styles
I'm writing (rewriting) my plugin to use
wp_enqueue_script('jquery');
wp_enqueue_script('jquery-ui-dialog');
Which is great!
But to use the dialog I need to load a jquery style sheet with ...
2
votes
1
answer
2k
views
Backslashes being stripped from CSS
The title explains my problem. Upon saving CSS stylesheet in the "Appearance > Editor", single backslashes are being stripped out of the stylesheet.
For example:
content="\foo"
becomes:
content=...
0
votes
0
answers
35
views
Drop down question
I am new to wordpress. Please pardon this question as it may seem mundane. How do I make a drop down menu for Information to the end-user in wordpress?
similar to this...
Thanks in advance...
0
votes
1
answer
65
views
SASS not showing in customized preloader plugin
I am new to WordPress and webdev in general so my skills are moderate.
I am using a plugin called WP Smart Preloader to build my sites preloader. It allows for the use of custom HTML and CSS. The HTML ...
1
vote
1
answer
13k
views
how to include javascript file and css file in wordpress
I am creating new plugin so i need add a java script file and css file.
These are my javascript files
jquery.min.js
jquery-1.3.2.min.js
jquery.tabify.js
Css file:
newstyle.css
0
votes
1
answer
53
views
Styles don't load correctly. Insecure content
I'm a newby developing plugins for Wordpress.
When I try to enqueue a style, Wordpress shows the following error: Insecure Content.
The code I use to 'attach' the css files is the following one:
...
22
votes
2
answers
1k
views
Is it ever okay to include inline CSS in plugins?
Normally in a plugin I would add styles using wp_enqueue_style. However, I am currently creating a plugin that only needs a few lines of CSS and I am wondering if it might be better to serve the ...
13
votes
2
answers
23k
views
How to add sub-menu to a menu generated by wp_nav_menu by using plugin
I have a menu generated by wp_nav_menu which look like
<ul class="nav-menu" id="menu-top-nav">
<li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-43" id="menu-...
2
votes
1
answer
243
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 ...
1
vote
2
answers
6k
views
How to check if a stylesheet is already loaded?
I was wondering how to check if a css file is already loaded. For example, I have in my theme Font Awesome font-awesome.min.css and I have a plugin that make use of Font Awesome too. So, I ended up ...
1
vote
1
answer
134
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
1
answer
245
views
Completely isolate a plugin view so it doesn't load the theme
We're making a WordPress plugin that generates an iframe with a shortcode, and that iframe that should work and display the same no matter what site, page or theme it's used on. The view is located at ...
3
votes
3
answers
1k
views
How to prevent loading of all plugin's resources?
Wordpress is loading all client resources of all plugins, not just the plugin of interest. It may make sense to load jqery globally but it makes no sense to load all other plugin's Javascript in a ...
1
vote
2
answers
312
views
CSS not affecting widget output
so I am still quite new to wordpress development so don't rage and I am sorry if I did something really stupid.
So I am having trouble with my CSS, for some reason it's not affecting the widget ...
2
votes
1
answer
78
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', '...
0
votes
1
answer
136
views
register dependency css and js inside a plugin class
I have this code:
public function __construct()
{
add_action('wp_enqueue_script' , array( $this, 'initBootstrap' ));
add_action('wp_enqueue_style' , array( $this, 'initBootstrap' ));
...
3
votes
1
answer
2k
views
Using standard backend elements in Plugin
I'm currently writing a plugin for a company. I created a custom backend page where the admin can change settings used by the plugin.
Currently it looks very messy because there is just too much ...
0
votes
1
answer
212
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 ...
0
votes
1
answer
742
views
Custom Plugin - CSS works, JS doesn't
In the plugin I'm making, I use separate js and css files (____.js, ____.css). This is the first time that I've included an external .js file in anything.
I'm registering and enqueueing both in the ...
0
votes
1
answer
249
views
How to add a dvi tag to a shortcode then change a generated text using jQuery
I have a plugin that generates tables based on mysql queries.
The plugin generated a shortcode that I put in posts to show the tables.
Above the table there is a button that has a span. the span text ...
0
votes
1
answer
514
views
How can I add the Post ID to Class Name in Jquery?
In the custom Wordpress theme archive page, I will have Sharing icons for all the posts. Below is the HTML for showing Sharing icon:
<span id="post-share-<?php the_ID(); ?>" class="post-...
1
vote
1
answer
100
views
Plugin CSS not enqueing
My apologies if there is an answer to this already making this a duplicate question, I have spend the last 3 days trying to get the CSS styling to be applied in a way that WordPress would allow, it is ...
0
votes
2
answers
286
views
Stop Plugin from Getting Styles from Other Plugin
My WordPress plugin uses Chosen Select and is supposed to use the css file at my-plugin/assets/resources/chosen.min.css.
Unfortunately, when another plugin also uses Chosen Select, my plugin has a ...
0
votes
1
answer
87
views
Does WordPress default CSS have Grids?
WordPress 'out of the box' comes with some javascript to allow you to send AJAX requests, show the image select dialog, etc.
Does WordPress 'out of the box' come with any default CSS? Especially for ...
2
votes
1
answer
4k
views
How do I register a stylesheet inside a WordPress widget?
I'm developing a WordPress widget following Dave Clements tutorial. It works well. Now I want to add some styles to it. I want the styles to be in an extra css file which will be loaded during runtime....
0
votes
2
answers
7k
views
Adding CSS to custom post type admin page causes error
I have this bit of code in my Meteor Slides plugin that loads a stylesheet on the admin pages of just the slides custom post type:
add_action('admin_head', 'meteorslides_admin_css');
function ...
0
votes
1
answer
1k
views
The Events Calendar Plugin - List View Background Colour Issue [closed]
I'm trying to look for some help, I've got a WordPress website that I'm working on.
I'm using this plugin called The Events Calendar, but in List View, the background keeps showing in transparency...
...
1
vote
2
answers
361
views
How can I add a CSS rule to edit.php?
I'm using add_filter('manage_posts_columns') in my plugin.php to add a column to the Edit Posts listing which is driven by edit.php. How can I attach a CSS style to the edit.php?
I want to be able to ...
0
votes
1
answer
164
views
Distributing Frontend Assets with Plugins
I'd like to distribute some custom style sheets (.css) and javascript files (.js) with my plugin. Is there a right way to do this in Wordpress? I can think of a number of different ways to do this, ...