Most Popular

1500 questions
98
votes
7 answers

Get rid of Another update is currently in progress

I was trying to update my wordpress core to 4.5.1 but my system was missing some permissions, and now after giving correct permission, I cannot get rid of that message and I cannot upgrade. Tried to look for a .maintainance file but there is…
Sam Provides
  • 1,195
  • 2
  • 9
  • 10
96
votes
3 answers

Between functions.php (theme), widgets, and plugins, which is loaded first?

Customer asks if a specific carousel plugin he uses can be widgetized. That means I should create a widget inside functions.php which calls the plugin's function. That means that the plugin's code has to be loaded first so that the function be…
pixeline
  • 2,877
  • 7
  • 34
  • 44
94
votes
11 answers

What are PHP extensions and libraries WP needs and/or uses?

Codex loosely only mentions PHP version in server requirements, however PHP can be configured in pretty wide range of excluding/including different parts. What are extensions/libraries that: are required for WP to work at all? MySQL... are required…
Rarst
  • 100,126
  • 10
  • 161
  • 298
93
votes
7 answers

What's the difference between home_url() and site_url()

My understanding is that site_url() returns the location where the WordPress core files are. If my blog is hosted at http://example.com/blog then site_url() returns http://example.com/blog But then how does home_url() differ? For me, home_url()…
Praveen
  • 1,055
  • 1
  • 8
  • 5
91
votes
1 answer

How to edit a user profile on the front end?

How can I edit a user profile in the front end with a form? first name, last name, username, email address and password
Carson
  • 2,375
  • 7
  • 26
  • 29
87
votes
11 answers

Remove "Category:", "Tag:", "Author:" from the_archive_title

I have the following code in my theme's archive.php: ', '' ); ?> This gives me titles like "Category: Russia", "Tag: America", "Author: John". I would like to remove the "Category:", "Tag:" and…
Nick
  • 973
  • 1
  • 7
  • 5
87
votes
10 answers

Enqueue Scripts / Styles when shortcode is present

What is the idea way to register/enqueue scripts and/or styles for use in plugins? I recently made a plugin simple plugin to add the user avatar/gravatar with a shortcode. I have different style options for displaying the avatar (square, round,…
85
votes
7 answers

to perform the requested action wordpress needs to access your web server. please enter your ftp

I'm following Changing File Permissions « WordPress Codex, yet when I'm try to update and/or install plugin and/or theme through wp-admin, I'm getting following: To perform the requested action, WordPress needs to access your web server. Please…
alexus
  • 950
  • 1
  • 6
  • 15
85
votes
15 answers

Remove slug from custom post type post URLs

It seems that all web resources based on the subject of removing a custom post type slug ie yourdomain.com/CPT-SLUG/post-name are now very outdated solutions often referencing pre WP version 3.5 installs. A common one is to: 'rewrite' => array(…
Ben Racicot
  • 1,446
  • 3
  • 18
  • 27
85
votes
15 answers

Steps to optimize WordPress in regard to server load and website speed?

Besides installing W3 Total Cache or another caching plugin what steps can I take to make sure that my theme and site run as fast as possible.
Paul Sheldrake
  • 2,047
  • 3
  • 22
  • 27
84
votes
4 answers

Create custom page templates with plugins?

Is it possible to make custom page templates available from a plugin?
jnthnclrk
  • 1,845
  • 4
  • 26
  • 52
83
votes
3 answers

Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?

Has anyone used autoloading and/or PHP namespaces within a plugin or theme? Thoughts on using them? Any harm? Pitfalls? Note: namespaces are PHP 5.3+ only. Assume, for this question, that you know you'll be dealing with servers that you know have…
chrisguitarguy
  • 21,552
  • 5
  • 63
  • 99
82
votes
8 answers

Custom Post Type Templates from Plugin Folder?

I'd like to offer my custom post type as a Plugin, so that people can use it without touching their theme folder. But custom post type templates -- such as single-movies.php -- reside in the theme folder. Is there a way to get WP to check for a…
nathanbweb
  • 925
  • 1
  • 7
  • 5
81
votes
9 answers

How to include PHP files in plugins the correct way

My problem is when on the main plugin file I include a PHP file something like this: include(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php'); // or include_once(WP_PLUGIN_URL . '/wordpress-group-buying/ipn/paypal-ipn.php'); //…
Bainternet
  • 67,748
  • 8
  • 132
  • 188
81
votes
9 answers

Get name of the current template file

I've found this to display the current name of the file used in template: function get_template_name () { foreach ( debug_backtrace() as $called_file ) { foreach ( $called_file as $index ) { if ( !is_array($index[0]) AND…
chodorowicz
  • 1,464
  • 1
  • 11
  • 13