0
votes
1answer
16 views

Simple/basic use of get_current_screen

I would like to load a stylesheet on only 3 admin pages: post.php?post=7&action=edit post.php?post=10&action=edit post.php?post=18&action=edit I was trying with admin_enqueue_script ...
0
votes
1answer
14 views

Is it possible to be more page/post specific with admin_enqueue_script?

I am using this code to load a stylesheet in the admin, but only on post.php related pages: function my_enqueue_for_post_pages_only($hook) { if( 'post.php' != $hook ) return; ...
1
vote
1answer
25 views

How do I add Bootstrap and LESS to my migrated WordPress site?

I'm migrating a website to WordPress - it uses both Bootstrap and LESS. I found a snippet online for enabling Bootstrap and the outputted CSS via functions.php: function theme_add_bootstrap() { ...
0
votes
2answers
52 views

Page Template Won't Load Correct CSS File

I can't get the correct css file to load for my page template. The page is correctly loading the template but still using the default css file. This is the code I'm using to load the page template's ...
0
votes
2answers
34 views

How to have Function of a plugin using global vars into a shortcode?

I am trying to convert this piece of code into a shortcode so it can be used inside my posts. Is it possible? I cant think of how to do it as I am beginner in wordpress and learning via books/youtube ...
0
votes
1answer
45 views

Functions.php in child theme that loads CSS file breaks website

I created a child theme and created a functions.php file in the child theme directory that also has the required style.css file and a seperate custom CSS file that I want to load. This is the code I ...
0
votes
1answer
44 views

Split Media Queries in different files!

I woke up this morning with a thought. Is it a good idea to split the different media queries in different files, check the width of the page in functions.php and then with an IF call the "correct" ...
0
votes
1answer
80 views

current_page_item is missing inside wp_nav_menu

I'm using the function wp_nav_menu like this: <?php wp_nav_menu( array( 'container' => false, 'echo' => true, ...
0
votes
2answers
59 views

Some questions about how proper add 2 CSS file in a WordPress theme?

I have the following situation loading a CSS. I have a WordPress theme that load a style.css settings file by this code into my functions.php file: /* Function automatically executed by the hook: * ...
0
votes
0answers
31 views

How to control the width of the container in theme customizer wordpress?

How can i control the width of #container in theme customizer through functions.php in wordpress. I want to make a control so i can set the width from 100% to 60% or 30% of my #container How can i ...
0
votes
0answers
28 views

Add custom css to menu while using custom nav_menu_tag

I created a custom menu to replace my li with td markers. However, I need to be able to add some custom tags through the wordpress menu. How do I do so? Is there something I can add to my ...
0
votes
1answer
70 views

Change CSS for logged in users

In my css i have a hidden div id: #example {display:none;} How can I set this to display:block for logged in users only? I am assuming using Jquery would be the best option here for best ...
0
votes
1answer
96 views

functions.php / replacing div's with new ones?

I'm not sure the best way to tackle this one: I have a menu I saw and like and want to use it as a basis for my own. I have the CSS for it. On the page it comes from its all labeled differently to my ...
0
votes
0answers
98 views

All “Featured Images” not displaying after Wordpress update

After updating to the latest version of WordPress today, I noticed that all "Featured Images" on my website are no longer displaying. After trying to figure the problem out for hours, I added the ...
0
votes
1answer
105 views

Custom colors for post rows based on post meta value

I'm trying to have the post background colors change depending on a meta value for the specific post type rather than using the post status. Looked everywhere and can't find a solution. (perhaps there ...
0
votes
3answers
678 views

JQuery undefined and Stylesheet loads in bottom along with js files

I'm developing a theme for wordpress and I'm using this function to enqueue scripts and styles function Joy_scripts() { wp_enqueue_style( 'Joy-style'); wp_enqueue_script( 'Joy-scripts', ...
0
votes
0answers
147 views

Cant get theme to change footer color through theme customizer

I am having an issue trying to configure the theme I am working on to allow the footer color to be changed. So far all of my other options work so I am geussing it is an issue with the way I am ...
-1
votes
1answer
121 views

Image width issue in IE [closed]

For some reason images are being displayed as a thin line in IE 8 and earlier and i cannot work out why this could be. I'm using CSS to re-size the images for the homepage, the reason for me using CSS ...
-1
votes
1answer
71 views

Integrating CSS Into a WP Function Call [closed]

Below is a code I use to display post views. It is integrated with an options panel which allows users to choose whether to display it. I would like to integrate the div class .postviews directly ...
0
votes
1answer
295 views

define css class in functions.php

In my theme I use theme options to set colors to categories (heading colors, dividers colors etc etc) The way I do it is defining variables which holds a color hexa like so: $category1_color = ...
1
vote
1answer
587 views

Using PHP to toggle stylesheet and header image, set in cookie

I haven't done a lot of work with cookies or Wordpress before so I think I've been a bit over-optimistic in my quest :p I have created two themes for my site, night and day. I would like the user to ...
1
vote
1answer
226 views

How to Display Frontend CSS for Administrator only

I've been asked to restyle the css of a WordPress website frontend. The website can't be in maintenance mode while working on it as it must stay up and running all the time. I assume that if I can add ...
3
votes
1answer
426 views

Logout/login redirect CSS issue

I'm using WordPress Multisite. When I use wp_logout_url(), I get redirected to the login page but somehow I end at a different login page without any styles applied <a href="<?php echo ...
0
votes
1answer
62 views

Basics of changing plugin output

There's a Mailchimp plugin I would like to alter it's output in order to match my needs. For example: Order in which fields are loaded are not correct Positioning of the plugin's response messages ...
1
vote
2answers
314 views

How to determine which custom header image is being shown

I'm using a customized version of the Twenty Eleven theme. I want to set a class on the body based on which random header image is displayed. Is there some function that allows me to get the name of ...
0
votes
1answer
236 views

Creating a mobile site by adding a new class to the body tag from functions.php

Essentially is there a way to use a function in functions.php to turn the <body> tag into <body class="mobile">? I have code that recognizes mobile devices but right now it's set up to ...
0
votes
1answer
203 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
2answers
214 views

Custom styles.css sheet for visual editor

I am trying to use my own styles.css for inside the body of the visual editor for my pages. However, when i add add_editor_style('styles.css'); to the functions.php page it doesnt change anything ...
0
votes
2answers
804 views

Best way of adding CSS which can be manipulated by the user via theme option panels?

I thought about adding it as inline CSS with code from the functions.php (not really sure how to do it). Something like this: function addcss() { background: $this_is_the_css_value; } I would ...
3
votes
2answers
815 views

Modify CSS via Theme Control Panel

Hi to all I'm trying to create an advanced control panel for my first Wordpress template but I'm not able to add a function that I will need. The function that I'm trying to add is the possibility to ...
0
votes
2answers
2k views

How to add CSS style sheet dynamically in wordpress

When certain conditions are met (e.g. post vs. page or a category is tagged, etc) I would like to load an additional CSS file. This file would, in theory, change link colors. Or perhaps change the ...
2
votes
3answers
546 views

wp_enqueue_script + how to load JS or CSS in one URL merge call?

Is there any proper wordpress way of including the JS and CSS through one merged URL? So that instead of loading in x number of separate calls for each JS asset, it can be all merged into one URL? ...