The customization tag has no wiki summary.
168
votes
108answers
59k views
Best Collection of Code for your functions.php file [closed]
Please vote on the question and any answers you find useful by clicking on the UP arrow on the left hand side of the question or answer.
As with many others who are now viewing this post, I have been ...
51
votes
7answers
12k views
Steps to Take to 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?
8
votes
2answers
4k 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 ...
11
votes
1answer
4k views
how to filter post listing (in WP dashboard posts listing) using a custom field (search functionnality)?
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 (ie supplier_name). I would like to be able to search and filter my posts ...
12
votes
3answers
1k 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 ...
2
votes
1answer
777 views
Check before publishing, if already exist post with current custom field value
I have a custom post type with only 3 custom fields in it.
$post_types = get_post_meta($post->ID,'post_types',true);
$post_taxonomies = get_post_meta($post->ID,'post_taxonomies',true);
...
5
votes
2answers
588 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
1answer
1k views
Linking Two Post Types
and thanks in advance for your help.
I've done some searching, and this question has been answered a couple of times with reference to the "posts 2 posts" plugin, but the documentation on that is ...
0
votes
1answer
357 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' => ...
1
vote
1answer
2k 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 ...
15
votes
6answers
5k 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 ...
3
votes
3answers
2k views
Make Custom Metaboxes Collapse by Default
I've created some custom metaboxes for my post write screen. Is there any way to make some of them display collapsed by default?
Just in case I'm not using the correct terms or not being clear in ...
3
votes
1answer
529 views
How to set up sub-categories for author pages?
I am setting up Wordpress for a school. They want to enable teachers to have their own section of the site where they can create posts in different categories (assignments, events, etc).
I know that ...
0
votes
2answers
2k 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 ...
-5
votes
1answer
280 views
What does this PHP function code mean? [closed]
Can someone please help me to understand each part of this code? Can you comment every line so I can understand and custom the code accordind to my purpose. Here is the link in pastebin:
class ...
14
votes
8answers
1k views
How to structure a plugin
This isn't a question about how to build a WordPress plugin. Rather, what, if any, guides could be applied to how to put together the file architecture of any plugin.
Some other programming languages ...
7
votes
3answers
3k views
Validating Custom Meta Box Values & Required Fields
Something which I have never seen covered is the best way to validate that specific form fields are filled out correctly for custom post type meta boxes.
I am looking to get expert opinions on how ...
8
votes
1answer
1k views
Add button to TinyMCE bar without creating a plugin
I'm trying to add a custom button or two to the TinyMCE rich text editor. The tutorials I've seen so far are either outdated or explain how to do it with a custom plugin. How can I do this without ...
4
votes
2answers
2k views
Wordpress Multiple Category Search
From few months I am digging into wordpress for multiple category search options, and finally came up with this.
I just found that wordpress allows multiple tags, which means that if in your URL you ...
3
votes
3answers
840 views
Removing fields from the Media Uploader/Gallery
I've been searching high and low for an answer.
I simply want to remove the Alternate Text, Caption, Description and Link URL-fields from the uploader and gallery view.
I seem that every thing else ...
3
votes
2answers
279 views
Localization: I want the backend: english and frontend in defined language
I'd like to have the backend of Wordpress in English and use a different locale for the frontend
so far I figure out perhaps I could do it by setting in the wpconfig the locale I want to use in the ...
3
votes
1answer
3k views
Customizing the Subject Field in WordPress' Notification Emails?
Can I customize and edit the subject field in the "Password Reset" notification mails sent from our multisite blogs? I have tried some plugins like My brand login and white label CMS etc. But I can't ...
3
votes
2answers
3k views
Adding Custom Fields to WordPress Comment Forms?
What is the best way to add custom fields to a WordPress comment form?
(for example subject, image, etc...)
And how do I use the data entered afterwards...
2
votes
2answers
719 views
How do I create a featured post within a custom post type?
Do I do this exactly the same way as I would with normal posts? I use a $featured_cat global variable and pull that out. Should I do the same here?
Or should I use an associated custom taxonomy? Or ...
1
vote
1answer
944 views
Custom Post Type Pagination Doesn't Work in Wordpress 3.4
I have a problem when using Wordpress 3.4. My "Products" custom post type pagination doesn't work. Here is the code I use
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new ...
1
vote
3answers
1k views
Any way to use a custom Parameter for youtube embed without using an iframe?
I do not want to display the titles of videos I embed on my wordpress site. The way I've been doing this is using the embed link, inserting the iframe in the wordpress post and adding the custom ...
1
vote
2answers
2k views
wordpress custom walker for thumbnails with custom menu
I'm still very novice at PHP so any help is greatly appreciated. Typically I have found the codex to be very helpful but it appears custom walkers may be outside its scope.
I'd like to have ...
0
votes
1answer
202 views
Unattaching images from a post
I currently have a custom post type in a theme I'm developing which will be used for portfolio items. So far, I have implemented functionality that allows images to be attached to a portfolio post.
I ...
0
votes
3answers
2k views
Prevent duplicate posts in wp_insert_post using custom fields
My source links are something linke this :
http://sample.com/entertainment/default.aspx?tabid=2305&conid=102950
http://sample.com/entertainment/default.aspx?tabid=2418&conid=104330
...
1
vote
3answers
853 views
How do I filter the excerpt metabox description in admin?
I want to change the default "Excerpts are optional hand-crafted summaries of your content that can be used in your theme. Learn more about manual excerpts." help text below the Excerpt input area to ...
1
vote
2answers
650 views
Custom Post Type with Custom Title
I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code:
function custom_post_type_title_filter( $data , ...
0
votes
1answer
2k views
Interesting Custom Post Type Slug with Taxonomy and Custom Field
I have created a custom post type called "events" and have also created a custom taxonomy which only shows up on this specific post type through which the admin must select an "event category" ...
0
votes
3answers
1k views
Removing Unnecessary Text from Admin Menu without CSS
I am looking for a way to remove all the unessesary text from default worpdress metaboxes.
Preferably I would like to ensure that the content is not just hidden through CSS but actually removed from ...
5
votes
4answers
672 views
How do I append multiple taxonomies to the URL?
Multiple taxonomies in URL
How does one append multiple taxonomies to the URL having the following:
Post Type: products
Taxonomy: product_type
Taxonomy: product_brand
Adding new ...
3
votes
2answers
605 views
How to force one column layout on custom post type edit page?
I've created a plugin using custom post types and I need to force the default two column post page to a single column. At the same time, the Publish metabox must move to the bottom. I need to do this ...
2
votes
3answers
520 views
Custom comment type maybe?
(First of all, sorry for bad english)
If there are people here using wordpress as cms, you probably realize that you dont need comment system that much. Esspecially custom post types like products ...
1
vote
1answer
794 views
Creating a custom Admin panel
I'm building a Wordpress Plugin and it has two tables and some data.
Right now, for displaying and changing the data, I'm using the wpdb function and manually creating the user interface (mimicking ...
9
votes
2answers
204 views
Specific upload folder for PDFs in custom Post type in WP multisite
I need to filter uploads to a specific folder for a custom-post type called "document" only for PDFs.
So far, I have:
function custom_upload_directory( $args ) {
$base_directory = ...
4
votes
1answer
2k views
Search multiple custom fields by using meta_query
I'm trying to create a search results listing for a custom post type and the problem I'm running in to is with the way the 'meta_query' parameter is stringing the passed values together. It appears ...
3
votes
5answers
3k views
Custom order of terms for custom taxonomy in admin and website
I have a custom taxonomy registered for my custom post type. I need to make it possible for a user to specify the order in which the taxonomy terms should appear (something like menu order for pages). ...
2
votes
2answers
559 views
Broken pagination
Well I'm here again with almost the same problem as I had in this post three weeks ago, but let me explain what has happened since then:
I was originally using one loop to display the most recent ...
1
vote
1answer
572 views
How to Remove Certain Screen Options and Table Columns from post type in wp_list_table?
On the page where we list all posts made: example.domain.com/wp-admin/edit.php
There is a Screen Options tab in the upper right corner. Upon clicking this, a menu slides down. Contained within this ...
1
vote
1answer
790 views
front end post with multiple upload images?
I am using front end post with upload image,
my code
if (!function_exists('wp_generate_attachment_metadata')){
require_once(ABSPATH . "wp-admin" . '/includes/image.php');
...
0
votes
2answers
644 views
Post from front-end only by logged in users, form posts as “posted by: <logged-in user's username>”
I've handrolled a form for posting from the front-end, with some custom functions that I needed. However, I've made the form only accessible when a user is logged in, and I'd like to have the articles ...
4
votes
5answers
3k views
Proper Way to Modify Plugin
What is the best way to modify a plugin? I frequently want to make small changes to one or two functions within a large plugin. This is easily done, but I have to use comments to mark my changes and ...
4
votes
1answer
1k views
Styling Shortcodes in Visual Editor
Does anyone know how to style the visual editor so that when specific shortcodes are used they are replaced with an image within the visual editor?
I have found that many users screw up the shortcode ...
3
votes
3answers
1k views
How can I create an alternative home page?
I'm working on a site which has a fully customized front page. Now I'm asked to add a more classic looking blog type page which will be reacheable at http://domain/blog.
I tried creating a custom ...
2
votes
1answer
309 views
Add a checkbox to post screen that adds a class to the title
I'm needing some posts to have different title colors than others, and I figured this would be most conveniently accomplished by some sort of check box on the post creation/edit screen. How would I go ...
2
votes
1answer
301 views
query_posts sort in multiple directions
I'm trying to improve my post sorting by using multiple criteria, but I want specific orders for different values. For example, I have a meta_key called 'featured' that I want to move any post up to ...
2
votes
1answer
644 views
media_handle_upload weird thing
I am using a front end script to upload images , all works fine but recently i noticed the uploaded images are not saved in proper directory. My settings are to Organize my uploads into month- and ...