Questions tagged [customization]
MEANINGLESS tag. Used as a merge target for other meaningless tags. Do not use it on new questions.
492
questions
346
votes
108
answers
168k
views
Best collection of code for your 'functions.php' file [closed]
As with many others who are now viewing this post, I have been reading various blogs, forums, and discussion groups to learn and improve my WordPress skills. Over the past 12 months I have been on a ...
214
votes
27
answers
62k
views
How to: Easily Move a WordPress Install from Development to Production?
I do development on one box and use a second for production. Right now I just dump the database and then do a find a replace for the URL changes; then copy over the files and import the new SQL.
Are ...
70
votes
5
answers
50k
views
Is there a flowchart for WordPress loading sequence?
So like WP must load series of files from,
index.php -> ... -> wp-header.php -> ... ->functions.php
...and so on upon execution.
Also there must be a similar flowchart for functions ...
152
votes
13
answers
57k
views
Hide the fact a site is using WordPress?
I have a website for which we are trying to be discreet about the fact that we are using WordPress. What steps can we take to make it less obvious?
EDIT- Important security note:
Please understand ...
138
votes
36
answers
18k
views
Objective Best Practices for Plugin Development? [closed]
Starting a community wiki to collect up objective best practices for plugin development. This question was inspired by @EAMann's comments on wp-hackers.
The idea is to collaborate on what objective ...
20
votes
2
answers
22k
views
Custom pages with plugin
I'm developing some plugin where I would like to enable custom pages. In my case some custom page would contain a form like contact form (not literally). When user will fill out this form and send it, ...
155
votes
10
answers
74k
views
Is moving wp-config outside the web root really beneficial?
One of the most common security best practices these days seems to be moving wp-config.php one directory higher than the vhost's document root. I've never really found a good explanation for that, but ...
13
votes
4
answers
19k
views
don't publish custom post type post if a meta data field isn't valid
I have a custom post type (CPT) called event. I have a meta box for the type with several fields. I would like to validate some fields before publishing an event. For example, if an event's date is ...
37
votes
4
answers
15k
views
Database synchronization between dev/staging and production
I have a problem with WordPress database synchronization between development and production and I am wondering how other people solving it. I am aware about this question but it doesn't really cover ...
30
votes
2
answers
34k
views
How To Add Custom Form Fields To The User Profile Page?
The user profile page has the following fields:
Username
First Name
Last Name
Nickname
Display name
Contact Info
E-mail
Website
AIM
Yahoo IM
Jabber / Google Talk
How can more fields be added to ...
41
votes
7
answers
17k
views
Conditionally Loading JavaScript/CSS for Shortcodes
I released a plugin that creates a shortcode and requires a JavaScript file and a CSS file to load on any page that contains that shortcode. I could just make the script/style load on all pages, but ...
41
votes
1
answer
28k
views
How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
Despite the fact I googled a lot, I've not found the answer to a very simple question :
I have some posts with a custom field (i.e. supplier_name). I would like to be able to search and filter my ...
1
vote
1
answer
418
views
Wordpress in "Couch Mode"?
I am trying to setup a "Couch Mode" (distraction free reading) on my WordPress blog as laid out in this article.
The guide in the article follows these steps:
Create a new page in WordPress ...
19
votes
4
answers
2k
views
Customizing a WordPress theme without changing it?
I have found and downloaded a theme. However I want to tweak the CSS some to change the design, colours etc. a bit. How should I go about doing this, while still being able to update the theme without ...
15
votes
4
answers
6k
views
Update widget form after drag-and-drop (WP save bug)
I've posted a bug-report about this a few months ago (on WordPress trac (Widget Instance Form Update Bug)) and I thought I'd try writing about it here too. Maybe someone has a better solution to this ...
61
votes
5
answers
78k
views
MySQL Database User: Which Privileges are needed?
The short installation instruction for WordPress ("5 Minutes") state that:
Create a database for WordPress on your web server, as well as a MySQL user who has all privileges for accessing and ...
54
votes
8
answers
234k
views
How to create a custom search for custom post type?
I have a search field for the blog posts, but I need an other for a custom post type. How can I create this custom search form with a different search result layout?
52
votes
7
answers
105k
views
How to remove admin menu pages inserted by plugins?
I've got the following code, which cleans up a lot of stuff that is not going to be used within the admin area:
add_action( 'admin_menu', 'my_remove_menu_pages' );
function my_remove_menu_pages() {
...
22
votes
1
answer
2k
views
How to create an API for my plugin?
I have been developing plugins for WordPress, most plugins I have developed use two or three classes, hence not as huge as Buddypress or WooCommerce.
I am planning to develop two open source plugins ...
5
votes
3
answers
5k
views
Need help with friendly URL's in Wordpress
I'm creating som custom templates in Wordpress and I'm passing some data in the URL's.
Currently my URL looks like this:
http://www.mysite.com/designers/?id=43&name=designer+name
The URL ...
76
votes
3
answers
56k
views
When to use is_home() vs is_front_page()?
I've found that is_front_page appears to return true when I'm viewing the home page and have a single sticky post assigned there.
It also returns true when I've assigned a page as the static front ...
37
votes
2
answers
10k
views
Explanation of update_post_(meta/term)_cache
I was reading over some best practices from 10up and they mention setting these two flags to false in a WP_Query ( depending on what you're querying ):
'update_post_meta_cache' => false: useful ...
28
votes
5
answers
59k
views
How can I edit post data before it is saved?
I have a plugin and I would like to be able to run the post content through some filters before it is saved to the database. From looking at the plugin api, I see that two hooks that look like they ...
22
votes
5
answers
8k
views
How do you use a CPT as the default home page?
I have a client who's site will be making heavy use of custom post types to configure their site. But I'm between a rock and a hard place for their requested home page.
In reality, the home page ...
4
votes
2
answers
6k
views
Multiple Domain Names - One WP Install (non-Multisite) - Default Each Domain name to Category Archive
Use case is somewhat simple - here goes:
Five people share a single wordpress install - not multi-user
Each person blogs and puts their posts in a their own unique category
Each person has their ...
33
votes
4
answers
1k
views
How to implement a customizable free OpenID authentication?
OpenID is a standard commonly used nowadays. I am trying to implement OpenID on my blog, but I have many difficulties.
I tried OpenID plugin but it seems to be incompatible with Wordpress 3.0.
I ...
18
votes
2
answers
6k
views
Best practices for localizing WordPress content?
A client asked for a blog that will have localized content (i.e. en.blogname.com for English content, fr.blogname.com for French content, etc). Being new to building such a blog, we recently ...
7
votes
2
answers
1k
views
Looking for a Table of Contents (TOC) plugin for WordPress
I am looking for a simple TOC plugin for WordPress that would create a ToC similar to the one from MediaWiki (Wikipedia). Usually I need this only for big pages and the TOC needs to be generated based ...
3
votes
3
answers
26k
views
Display posts by month
I want to achieve something like this, I don't know if it is possible and what would be the best way to do it:
The way I query the posts is like this:
<div class="post">
<?php global $...
1
vote
2
answers
3k
views
Assign Page Template Within A Custom Post Type
I have registered a Custom Post Type and created a file called archive-myCPT.php and another one for single posts called single-myCPT.php.
What I want to do is to create a page where I will show just ...
108
votes
8
answers
78k
views
Organizing Code in your WordPress Theme's functions.php File?
The more customization I make to WordPress the more I start thinking about if I should be organizing this file or splitting it up.
More specifically, if I have a bunch of custom functions which only ...
44
votes
3
answers
2k
views
Opinions and recommendations on the best barebones base theme [closed]
Preamble
I'm finding myself building more and more WP sites "from scratch" as it were (ie: ignoring any theme designs out there and just creating a design wireframe purely on the needs of the client. ...
41
votes
12
answers
21k
views
What is your best practice to execute one-time scripts?
The Problem
We all have been in a situation like this, and a lot of questions on this site need a solution like this. You either have to update a database, insert a lot of data automatically, convert ...
31
votes
7
answers
36k
views
Add validation and error handling when saving custom fields?
I have a function that defines a custom field on a post type. Say the field is "subhead".
When the post is saved, I want to do some validation on the input, and display an error message on the post ...
19
votes
6
answers
21k
views
How to *remove* a parent theme page template from a child theme?
I'm using the TwentyTen theme to create a child theme, but I can't seem to get rid of the 'One column, no sidebar' page template that is in the TwentyTen parent theme.
I thought just copying it over ...
17
votes
2
answers
12k
views
Creating an Image-Centric Custom Post Type?
Does anyone have any tips for creating an image-centric custom post type?
To elaborate, my blog has rotating header images, shown below:
The two images in the top left are randomized, and exist as ...
15
votes
3
answers
22k
views
How to Link External jQuery/Javascript files with WordPress
So I'm using Starkers to base my next WP theme on and I've run into a small issue, I was including my own version of jQuery in the header.php file but when inspecting my site using Firebug I noticed ...
13
votes
5
answers
18k
views
Is there a way to set default custom fields when creating a post?
When I'm creating a new post, just after clicking "Add New", when the post editor shows, instead of having to use the dropdown and choose a custom field to use, I'd like to have some default custom ...
10
votes
4
answers
47k
views
Why are the comments disabled by default on my custom_post_types?
I am using a custom post type + taxonomies in a podcast solution for a client. The setting (settings >> discussion) for comments is set to "allow comments". When I add / edit posts under the "posts" ...
9
votes
5
answers
3k
views
WordPress local development environment [closed]
Everything on WordPress is primed for a production server, and hardly mentions info on development stuff.
I want to setup a WordPress blog locally so that its good and ready before it goes live. Are ...
8
votes
3
answers
1k
views
Is the new WordPress 3.1 admin bar pluggable and how can I extend it?
How can I extend the functions of the WordPress 3.1 admin bar in my plugins?
I am looking for specific hooks and filters to use in adding links or other features to the admin bar.
A good example of ...
6
votes
1
answer
845
views
How to get current_cat in navbar, in single post
In a site I have using Wordpress 3.0, when I'm in a single post, the navbar showing the categories doesn't give the parent category the class of "current_cat" and therefore that category is not ...
5
votes
2
answers
6k
views
Is There A Hook To Process The Content Of The Text Widget?
Is there any filter which can be used in a plugin to process the content of the text widget before it is rendered?
3
votes
1
answer
6k
views
Hide a page in the admin end without a plugin?
I'm creating a series of pages with iFrames embedded in them, but it seems the only way to do this within Wordpress (i.e. using the templating system) is to create pages in the admin end and then ...
3
votes
1
answer
2k
views
Rearrange elements outputted by comment_form()
I'm currently developing a custom theme from scratch.
In the past week, I've been trying to change the order of the HTML elements output by the comment_form().
I basically don't know any PHP, and I ...
2
votes
4
answers
159
views
Best practices for making a WordPress site "movable"?
I'm planning to buy a domain and install a WordPress site on it at a web-hosting company. But first I'll need to iron-out some bugs... I got a working LAMP-stack at my home-computer, so I'm thinking ...
2
votes
2
answers
6k
views
Automatically wrap post image in div
In regards to image attachments inserted into a post, I would like to wrap the img tag inside a div tag for specific design purpose.
Is there a way to do this automatically after attaching the image ...
0
votes
1
answer
2k
views
How to Use the Function is_user_logged_in To Display Different Menus?
So, I want to create different menus for people who are logged in or not.
I got a reply that i should use a function
if (is_user_logged_in()) {
wp_name_menu(array('theme_location' => '...
64
votes
3
answers
153k
views
How to change the default registration email ? (plugin and/or non-plugin)
After a new user registration, WP sends out an email with the login / password, and a link to the login page.
Is there a way to change this defaut email template? I'd also like to change the subject ...
55
votes
6
answers
3k
views
Essential technical features for high-end WordPress web hosting? [closed]
I'm posting this as a community wiki because I'd like to get a collaboratively edited list of features for a high-end WordPress webhost.
For example, if you are running a high-traffic WordPress-...