Questions tagged [themes]

A WordPress Theme is a collection of files that work together to produce a graphical interface with an underlying unifying design for a blog.

Filter by
Sorted by
Tagged with
4 votes
2 answers
18k views

Changing the visible url path to css & js files

Does anyone happen to know how I can automatically turn: http://www.example.com/wp-content/themes/theme-name/css/stylesheeet.css into http://www.example.com/css/stylesheet.css Naturally I could ...
NetConstructor.com's user avatar
4 votes
2 answers
2k views

How can I get wp_head() as a string instead of echoing it?

I'm using PHP handlebars templates and would like to keep all of the HTML in the template file so I don't have a header.php but rather the handlebars looks like <html> <head> {{#...
tsdexter's user avatar
  • 181
4 votes
1 answer
1k views

Activate a new WordPress Theme Only for Admins

I am going to change the theme of one of my site. I need to do lots of changes also for new theme. So what I want to do is, I need to activate the new theme only for admins. When any other user ...
Ranuka's user avatar
  • 1,784
4 votes
1 answer
952 views

Is the theme customizer slowing down my site?

I have built an awesome theme, which is very flexible, because it has 500 settings of different (custom) types in the theme customizer. I generate the live css like it says in the codex: function ...
cjbj's user avatar
  • 14.5k
4 votes
3 answers
226 views

How to incorporate admin theme in my back-end-plugin

I'd like to use some colors from the wordpress admin theme to build my back-end plugin's theme, based on Bootstrap-3 & SASS/LESS. I think I saw a few functions to get the colors of the admin ...
xamiro's user avatar
  • 143
4 votes
1 answer
20k views

Edit theme wp_head

My wordpress render in the head tag lots of unneeded script or css files, I tried to fix this by editing my head.php page but the theme I was using (zerif) use wp_head function to include all the ...
Marox Tn's user avatar
4 votes
3 answers
5k views

Symlink a directory to wp-content/themes

Is it possible to symlink a directory from my project folder to my wp-content/themes folder which is in a Vagrant setup called chassis: https://github.com/Chassis/Chassis ? I tried to symlink already ...
Sam's user avatar
  • 201
4 votes
2 answers
233 views

How do i structure my theme folder to avoid one huge list of files

When working with a worpress site with lots of custom post types and lots of page templates, my theme folder is looking messy. What are the accepted best practices to organise code files in WordPress? ...
Will's user avatar
  • 352
4 votes
3 answers
1k views

How to trigger function on theme delete?

Tried to find an or some hook to fire a function when theme is being delited, but didn't find any hook.. May be someone can tell if there's a way to fire my function on themes delete event? I need ...
Maikal's user avatar
  • 638
4 votes
2 answers
675 views

What's the earliest point I can get the queried object ID?

I'm writing a supplement plugin to Wordpress Mobile Pack because I would like to use the default theme on pages that are assigned a certain page template. My plugin will only deal with the mobile ...
Andy's user avatar
  • 153
4 votes
4 answers
2k views

One button to change all settings in theme customizer?

I have been attempting to create a theme reset button for the theme customizer that automatically removes all of the theme_mod settings. I have tried multiple ways to do this and have never been able ...
user1632018's user avatar
4 votes
1 answer
101 views

Hide Twenty Eleven Theme From Themes Page

Is there a way to hide the Twenty Eleven theme from the "Themes" page in wordpress? I have 10 themes for clients to choose from and i don't want them to be able to see the Twenty Eleven theme or be ...
Tory's user avatar
  • 219
4 votes
1 answer
291 views

Best practice (forward compatibility) for theme options

So here is what I'm wondering... You all know about Option-tree and similar frameworks that theme authors are using for their theme option pages. You also all know that since 3.4 WordPress introduced ...
ZK_'s user avatar
  • 79
4 votes
1 answer
724 views

How can I list only sites that use a particular theme or plugin?

I need to search through dozens of WordPress multisite (network enabled) installs for sites that use a particular plugin. How can I list only sites that use a particular theme or plugin, preferably ...
iroast's user avatar
  • 41
4 votes
0 answers
74 views

Using Primary Color in Plugin Block

I'm developing a Gutenberg block, and I want the block to fit in as nicely as possible with the users site. So I'm trying to include as little styling of my own as possible, eg. allowing buttons to ...
Netråm's user avatar
  • 149
4 votes
3 answers
1k views

Wordpress generating 404 on .mp4 file in theme folder

I am trying to load a full width video on my homepage. My situation is almost exactly like: Video Background - (php & css) - generating 404 error on page load - Wordpress Theme File Structure ...
Johanna's user avatar
  • 41
4 votes
4 answers
5k views

Automatic Updates For Private And Commercial Themes?

Is there any way to get wordpress to check for, download private theme updates? I found this plugin for private plugin updates.... http://w-shadow.com/blog/2010/09/02/automatic-updates-for-any-...
agileapricot's user avatar
  • 1,509
3 votes
1 answer
25k views

What are nulled themes?

In WordPress there is a concept of "Nulled Themes". I searched information about it (on Google) and found some people say it is hacked and others say it is not. I ran the "iThemes ...
Abdallah Sabri Hussein's user avatar
3 votes
2 answers
4k views

Removing Shortcodes from Child Theme

I'm trying to remove the shortcodes from a child theme. In my functions.php file (for the child theme), I've put: function my_remove_shortcode(){ return ''; } add_shortcode('entry-twitter-link', '...
Teknophilia's user avatar
3 votes
4 answers
4k views

Can I Download a Free Wordpress Theme, Edit it and Use it?

I read that all themes on the wordpress.org site are GPL compatible. So can I download the theme, edit it and use it? Can I remove the links that point to the theme developer's website? Does the GPL ...
user avatar
3 votes
3 answers
2k views

Add colors to existing color palette without replacing it

Using add_theme_support( 'editor-color-palette' ) one can replace the color palette in the Gutenberg editor by a custom one: add_theme_support( 'editor-color-palette', array( array( 'name'...
leemon's user avatar
  • 1,898
3 votes
3 answers
14k views

Child Theme not loading parent CSS

I'm using the MyStile theme for a new site. I'm trying to create a child theme so I can modify the theme and not have my changes overwritten, however once I activate my child theme, the whole styling ...
Toby Cannon's user avatar
3 votes
1 answer
6k views

Why are my widgets not saving when being added to a sidebar?

The following is in my function.php file. I see the sidebar in my Appearance > Widgets page but whenever I drag something on over the sidebar and save it just disappears once I leave the admin area....
Gazillion's user avatar
  • 317
3 votes
1 answer
515 views

Is it good practice to remove redundant plugins and themes?

Is it good practice to remove all of the plugins and themes that are redundant? Also, if so, why is it good practise to remove them?
P082's user avatar
  • 143
3 votes
2 answers
327 views

Ship plugin with a custom theme

I need to add a plugin to a theme and enable it automatically once the theme is activated. Would also like to change its settings if possible. This is the plugin I am trying to include: https://...
user3312508's user avatar
3 votes
1 answer
7k views

Hourly Routine Not Firing ( wp_schedule_event() )

This is a practically copy/pasted version of the hourly wp_schedule_event example taken from the .org site. Its not moving...and I know I have visitors to "trigger" it. Its kind of a pain to wait an ...
user1915665's user avatar
3 votes
4 answers
1k views

Using a Theme inside a Plugin directory

I am building a mobile friendly plugin and put the theme directory inside the plugin directory. If it's a mobile browser, how can I redirect to the theme in the plugin directory? /wp-content/...
Hamza's user avatar
  • 133
3 votes
2 answers
181 views

Detection of theme being used

OK, this may be a dumb question. Is it possible, using PHP, to detect which theme has been set for use by Wordpress ? If so, how's it done ? Thanks.
rlpublishing's user avatar
3 votes
6 answers
253 views

Building useful features into your theme

My site has a theme which I created myself, and while it works, I often have to tweak the theme or use plugins to modify the appearance or behaviour. I've been looking at ways to modify my theme so ...
3 votes
3 answers
12k views

Replacing mysql_real_escape_string in WordPress theme

I'm having an issue with mysql_real_escape_string. This is used to display a custom post type (food menu items) for the WooThemes Diner theme. Food menu items no longer display on the Diner menu page ...
tinym's user avatar
  • 41
3 votes
3 answers
13k views

Problem : deletion failed, the theme requested does not exist

I had an awkward problem when i want to delete my theme, it gaves me this message: deletion failed, the theme requested does not exist wordpress. I can delete it from ftp manually but for client i ...
Carl Willis's user avatar
3 votes
2 answers
12k views

How to remove “Proudly powered by WordPress” in Twenty Sixteen (2016) theme?

How to remove the: {site} / Proudly powered by WordPress in bottom of generated pages using twentysixteen (2016) theme on version 4.5.2? Would prefer if this change was not affected by later ...
EquipDev's user avatar
  • 133
3 votes
3 answers
10k views

How to use scss in wordpress theme?

What is the easiest way to use scss? i Tried the wp-scss plugin but it doesnt seems to work for me: In my theme: root: css -> style.css scss -> style.scss settings for scss and css location ...
Meschiany's user avatar
3 votes
4 answers
5k views

Is it possible to stop a theme activation when a certain plugin is not activated

So I am planning a theme that will depend on a plugin (for instance Timber or Themosis). So of course a theme will break if it can't use it's depending plugin's. So I would like a way to stop the ...
Ilyes512's user avatar
  • 141
3 votes
3 answers
25k views

add image size still doesn't work even after regenerating thumbnails

I'm encountering this very frustrating problem where add_image_size() just doesn't seem to work at all (in fact, I've never seen it even work before). By not working, I mean not resizing / crop (if I ...
Bobby's user avatar
  • 313
3 votes
3 answers
2k views

Hide a theme on list of themes in wp-admin without editing core files

I'm running a multisite network with 200+ themes installed and activated. Is there a way to manipulate the list of available themes in wp-admin so that certain theme does not appear in the list? I ...
grosshat's user avatar
3 votes
6 answers
9k views

Get URL of a specific file

I have a file that can either be included in a plugin, or in a theme. What's the best way to get the URL of the file's folder (from within the file)? Edit: I'm now using this for now home_url( '/' ....
Dogbert's user avatar
  • 279
3 votes
1 answer
3k views

Show a WP 3.0 Custom Menu in an HTML Select with Auto-Navigation?

As part of a theme for a client, I want to be able to show a custom menu (defined via the admin) in a select box that automatically changes pages after changing the selection. Is there a plugin (or a ...
Keith S.'s user avatar
  • 433
3 votes
3 answers
2k views

How get list of updates of wp site?

i need to get a list of all updates the wp site need (core, plugin and themes). i already know about wp_get_update_data(), but it give me back only the number. i need to get for example: plugin1 | ...
DevBeppe's user avatar
3 votes
2 answers
227 views

Display custom_background outside wp_head()

My theme is a very small one page theme which really doesn't need all the scripts, so I've created a few options to remove wp_head() and wp_footer() so the user can choose if they want to enable or ...
J. Doe's user avatar
  • 317
3 votes
2 answers
4k views

Permanently remove first image from posts

I have around 2,500+ posts on my site where I've inserted images using the traditional method into the post content itself. In upgrading to a different theme, the single post page now displays the ...
user2803938's user avatar
3 votes
1 answer
4k views

Why is get_post_format() for "Standard" returns empty

I've enabled custom posts types add_theme_support( 'post-formats', array( 'aside', 'link', 'gallery', 'status', 'quote', 'image' ) ); The default post type is set on Standard, and it works for all ...
ilyo's user avatar
  • 356
3 votes
1 answer
11k views

I'm trying to add an image in my CSS

I'm trying to add an image in my CSS with the theme folder code, <?php bloginfo('template_directory'); ?>, which works in HTML but for some reason it's not working in the CSS. Does anyone know ...
talkingD0G's user avatar
3 votes
3 answers
4k views

Multisite: setting theme and options when a new blog is created

When a new blog is created in a WP Multisite instance I want to be able to set the default theme and configuration options create 2 menus (main and secondary) and associate them with the 2 slots ...
anu's user avatar
  • 9,552
3 votes
2 answers
1k views

What is the first file wordpress looks at in a theme?

I've inherited a theme and am trying to get my head around a plugin failure. There is an index.php file in the root of the theme, is that the first file wordpress will look at when it attempts to ...
SeanJ's user avatar
  • 167
3 votes
1 answer
2k views

Set active theme via URL

I have a new WP site with a couple of candidate themes, and would like the end user to be able to "browse" my themes. For that, I would like to use the Theme Switcher plugin By Ryan Boren, or ...
ProfK's user avatar
  • 172
3 votes
4 answers
8k views

Where do I find the functions triggered within a hook?

I'm new to WP, but have used other CMSs in the past. I wanted to make a simple Woo-commerce store, for practice. I installed WP, Woo-commerce and the Woo-commerce Store Front theme and all went fine. ...
MeltingDog's user avatar
3 votes
3 answers
6k views

What does "Do not deregister the jquery script in the administration area" mean?

We all know the advantage of using cdn caching etc.. For that sake i deregistered the script and registered jquery with cdn link . But the problem is that it is showing error like this Yes Debugging ...
stlawrance's user avatar
3 votes
1 answer
466 views

Getting headers property from WP_Theme object

Using wp_get_theme returns an object holding the properties of the current theme. The headers property contains any array of information I wish to access. I can access the other properties using ...
myol's user avatar
  • 776
3 votes
2 answers
13k views

Grab the first paragraph of each post

I have some code that uses preg_match to grab the first paragraph, and then spit it out in the loop: function first_paragraph() { global $post, $posts; $first_para = ''; ob_start(); ...
tmyie's user avatar
  • 863

1
3 4
5
6 7
59