All Questions
Tagged with css plugin-development
79 questions
0
votes
0
answers
29
views
WP Plugin CSS not being applied to page
I am making a shortcode plugin that sends a variable to a JS script.
The CSS is not being applied to the page with the shortcode or any other page. Any idea to fix this, please? The CSS link does ...
0
votes
2
answers
69
views
My stylesheets are not enqueuing
I'm in Wordpress 4.5.2 on Windows 10 and I'm trying to register and enqueue my stylesheet in Wordpress, but it just isn't working. I'm having the same problem with jQuery.
I have this code in a ...
0
votes
1
answer
206
views
Let user override plugin CSS
I'm writing a plugin, which has a certain style. However, that style won't suit every site. therefore, I would like to let the site admin override the plugin CSS if they want.
How would I go about ...
0
votes
1
answer
35
views
How to customize the size of Featured Images or Post Thumbnails in WordPress?
I have added custom image as featured image but I have add a bigger size image but when I see the post I got the small image in the post.
My question is how to set or customize the figure size of ...
1
vote
2
answers
387
views
Remove Internal Style Sheet if no Value Provided?
I am using this code to add my options inside head section code works but my problem is that if no values are provided my function still echoes an empty <style type="text/css"><style> into ...
0
votes
1
answer
35
views
change or add css to theme from plugin
I want to add/change the CSS of my current theme from my plugin.
I've tried add_action and wp_enqueue_style and doesn't work
My code:
function register_plugin_styles() {
wp_enqueue_style( '...
0
votes
0
answers
51
views
How to include JavaScript script only on specific page [duplicate]
I am creating my own widget. I need to use custom css and js files. I have used wp_register_style`wp_enqueue_styleandwp_register_script\wp_enqueue_script` functions in order to register custom styles ...
1
vote
2
answers
1k
views
What parameter should I pass to wp_enqueue_style to depend on the themes stylesheet?
I have written a basic gallery plugin that uses wp_enqueue_style to include a stylesheet on the page. I'd like for the WordPress theme to be able to override the style of the plugin which means I'd ...
0
votes
1
answer
401
views
Multiple Block Quotes without using HTML
First of all, I have a client that has no HTML knowledge.
He wants his all his posts to have a certain format where within the post body, he can add multiple pull quotes with different styles.
Note ...
0
votes
1
answer
23
views
Make a plugin page out of influence of the theme's style
I have to make several change to my style to be with what i want, when i export a project to a wordpress plugins :
Based on this :
When including it into a plugin, i finally got this :
This output ...
1
vote
2
answers
25
views
What would I need to write into a custom plugin in order to add a switch for a custom string of CSS to the edit page?
I have created a page on one of our sites which has a few snippets of custom CSS to make it display in a very modern, 100% width style like this, as opposed to the standard, more constrained style of ...
0
votes
1
answer
35
views
Unable to link CSS file
I use this to link to my CSS file:
$css_file = plugin_dir_path( __FILE__ ) . 'MapStyle.css';
echo '<link rel="stylesheet" href="', $css_file, '" >';
Which (correctly) resolves as (echo $...
0
votes
2
answers
342
views
How To Protect Plugin Display From Being Affected By Theme's CSS
I am developing a custom wp plugin that is using shortcode to display table in the front end. But its front end display is affected by the theme's css. So it is always following the table styling that ...
0
votes
1
answer
576
views
Apply styles to blockquote element with the WYSIWYG editor
I have a blockquote and I can float it left or right if I want by going into the html editor and adding class="alignleft" etc. Is there any way I can make that available to a non tech individual with ...
0
votes
1
answer
139
views
Custom CSS not being added by plugin
I am attempting to add custom css through my plugin. I do have wp_head() called in my header.
My code is -
/**
* Enqueue plugin style-file
*/
function prefix_add_my_stylesheet() {
...
0
votes
1
answer
74
views
widget: input the px value from user and use it as inline style in widget function
I am trying to dynamically add margin-bottom property to my widget. For example, I am inputting the value "50px" from my widget and want to use this value to adjust margin-bottom property for the ...
0
votes
2
answers
755
views
wordpress admin plugin menu custom css
I have a plugin that has a top level menu and subsequent submenus. Each one of these pages are going to need their own css and javascript. My code at the moment is:
//main menu
add_menu_page( "My ...
0
votes
1
answer
374
views
CSS not being applied using wp_enqueue_style
I am trying to load my style sheets in my plugin but they are not being called, the javascript files however, are being loaded.
<?php
/**
Plugin Name:
Plugin URI:
Description:
Version:
Author:
...
1
vote
0
answers
123
views
How to remove default style of header in wordpress metabox
I have the problem which when I create a header in my wordpress plugin metabox, it always apply the default style on my header:
even when I apply, my own style, <h3 style="background-color: black;...
0
votes
2
answers
300
views
Proper way to include stylesheet for panels
What is the proper way to include a stylesheet with my options panels in wp-admin for a given plugin or theme. In other words -- the stylesheet that styles the panels.
I mean, in my panel template ...
1
vote
1
answer
440
views
How do I write into a file (css)
I'm writing my first wp plugin and I have many problems, most of those I got to solve by just reading the codex, but I don't know how to write into a css file within my plugin's options. Maybe there's ...
0
votes
1
answer
154
views
Load stylesheet in edit category page?
I have a plugin that I want to add a stylesheet to each "edit category" page because I added additional custom fields into those pages.
Is there a simple way of doing this or do I have to use the URL ...
0
votes
2
answers
131
views
Plugin Development/ Stop CSS clashes.
I have searched all over and I am a little confused about my first plugin that I am developing.
I created a shortcode that the user can use on any page they create. The issue is that on a lot of ...
1
vote
1
answer
60
views
Correct check for any admin page with editor
I have read the codex, but found it a bit incomplete. I like to load stuff only on pages where the post editor is visible. This should include custom post types and everything.
I am a bit insure ...
1
vote
1
answer
156
views
How do I include background images in my stylesheets in a plugin?
I'm trying to specify a background image in a style in a plugin I'm making. I was just outputing tags from the php, but realized I should probably be using enqueue_style... But how do I put a line of ...
0
votes
1
answer
173
views
Best practice to include custom user styles in widgets
What's the best way to include custom user styles in widgets? For example adjust colors for buttons, borders etc. without having the user to develop a complete new stylesheet.
0
votes
2
answers
48
views
Are there any official or unofficial guidelines for the styling of a widget?
I've designed a sidebar widget and found that on many themes the widget looks fine. However, certain themes make the widget look out of place (clashing with colors, bad contrast, etc.)
Are there any ...
3
votes
1
answer
114
views
What is the best way to provide plugin users with a way to customized the styles
I'm working on a plugin to be release to the public, it is a very simple plugin that includes a single html element in the page html.
I can do many things to allow users customize its appearance:
1. ...
0
votes
1
answer
67
views
Wordpress Plugin Authoring question about jquery and css
When I'm writing a plugin, do I assume that jquery is included, or should I always wp_enqueue_script it and let wordpress figure it out?
Also, what's the best practice for getting an image path ...