6
votes
1answer
820 views

How to load wp_editor via AJAX

Does anyone know how o load wp_editor via AJAX in WordPress? My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not ...
5
votes
1answer
2k views

How to store widget fields data as an array?

I am creating a widget, it needs to store about 10 IDs. Right now I'm using following field method to store each of the ID in a separate field. It stores data of each field in a separately in the ...
2
votes
2answers
4k views

limit the words in the post content and add read more link

As you can see into the code, the routine is to display the post which has an id of 266. Now all I want is to limit the words displayed in the post content of that post. Let's say, I want to limit the ...
2
votes
1answer
228 views

How to add terms to a post depending on its title?

I want to add all posts with keyword "Dog Training" in the post title to a specific category. Reason: If you enter something into WordPress search it's not an exact match. Previous WordPress search ...
1
vote
1answer
333 views

order post my meta value m/d/y format with year as included value

current order: 01/01/2013 12/07/2012 12/08/2012 . . . . 12/31/2012 ------------- 01/01/2013 should appear last My code: $paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; $today = ...
1
vote
1answer
1k views

Show only oldest post by author

I am working with a heavily customized install of WP. I've set up a specific post type, taxonomy, and roles that gets to use just that post type. Ideally, I'd like to restrict members of that role ...
-2
votes
2answers
2k views

How can I make all gallery images to open in a new window?

How can I make all gallery images to open the high resolution image in a new window?
2
votes
2answers
894 views

How to add or remove metabox each page separately?

How to add a meta box for a particular page, say: for only About Us page. How shall i do? The current code adds the metaboxes for all pages: function myplugin_add_custom_box() { add_meta_box( ...
0
votes
1answer
368 views

Dynamic content in a static page

I have developed some calculators (in php) for my website and I need Wordpress integration. The calculators have a form and, after submission, the result is shown. The result depends on a query in ...
0
votes
2answers
3k views

Multiple orderby parameters in pre_get_posts() action

Referencing @Otto's response to a question I also had about ordering by multiple fields, here is what he said: Can't do it with a naive WP_Query. Use the posts_orderby filter to add your own ...
-1
votes
2answers
842 views

Theme's text domain & language.PO file not working

I can't get my translations to work in my theme. Here is what I have In functions.php, I have: load_theme_textdomain( 'transparent', get_template_directory_uri() .'/languages' ); I have ...
34
votes
3answers
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. ...
15
votes
4answers
11k views

How to Hard Code Custom menu items

Is there any way that i can hard code the custom menu items when first theme installed? I am creating a theme which will automatically make some common pages when installed. So I need to know if I can ...
15
votes
3answers
4k views

How to create live autofill search?

I am currently trying to create a wordpress search function that shows live results underneath the search bar. There is an example on the World Bank website (screens below). I'm not looking for an ...
16
votes
6answers
77k views

How to display WordPress User Registration Form in front end of the website?

How to display the WordPress user registration form (the form that appears in "www.mywebsite.com/wp-register.php" page) in the front end of my blog? I have customised the registration form. But don't ...
12
votes
2answers
5k 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 ...
13
votes
4answers
8k views

How do I add CSS options to my plugin without using inline styles?

I recently released a plugin, WP Coda Slider, that uses shortcodes to add a jQuery slider to any post or page. I am adding an options page in the next version and I would like to include some CSS ...
12
votes
5answers
5k views

single-{$post_type}-{slug}.php for custom post types

My favorite part of the Wordpress template hierarchy is the ability to quickly create template files for pages by slug, without having to edit the page in Wordpress to select a template. We can ...
4
votes
3answers
14k views

How to redirect/rewrite all /wp-login requests

Is there any simple way to have wordpress, php or apache rewrite all urls which involve /wp-admin to /admin? I have added this entry to my .htaccess file: RewriteRule ^admin /wp-login.php [L] ...
21
votes
2answers
11k views

How to add a custom field in the advanced menu properties?

Is it possible to add a custom field to menu items? What I want to do is be able to add a field for 'French Navigation Label' and a 'French Title Attribute' in the wp menu interface.
20
votes
2answers
20k views

Any docs for wp_nav_menu's “items_wrap” argument?

I'm using wp_nav_menu and am trying to create custom output for the sub-level drop downs. I came across the "items_wrap" argument but there's really not much information as to what it is, how it ...
14
votes
2answers
5k views

How to show a custom meta box on the “Quick Edit” screen?

I've used add_meta_box() to add a custom meta box to the WordPress edit window on both pages and posts. How can I make this meta box also show on the "Quick Edit" screen? Ideally, I'd like it to ...
20
votes
4answers
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 ...
9
votes
3answers
11k views

How To Activate Plugins via Code?

If possible, how can installed plugins (meaning the files have been placed in wp-content/plugins directory) be activated from other plugins?
7
votes
1answer
9k views

Add filter menu to admin list of posts (of custom type) to filter posts by custom field values

This answer is very close to what I am looking to do, but instead I would like to specify a specific custom field and display a select menu of its available values. Thanks!
7
votes
5answers
5k views

Remove Ability for Other Users to View Administrator in User List?

(Moderator's note: Original title was "Remove Admin from User Menu") I have created a client administrator role which is essentially an Editor with ability to add/remove users. The article "Editor ...
11
votes
4answers
6k views

User registration followed by automatic login

I am using a plugin modified for my purposes. What I am after is after the user has registered for it to automatically log them in and return them to the current page. At the moment it sends them an ...
10
votes
1answer
527 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 ...
14
votes
1answer
4k views

Why does save_post action fire when creating a new post?

I'm surprised by the fact that my function that I've tacked onto the save_post action fires when I click the "New Post" link in the Admin Dashboard. Note - this is before I've pressed Save or Update, ...
11
votes
3answers
2k views

Open Source Forum for wordpress similar to stackexchange or stackoverflow [closed]

I have to add forum feature in my wordpress blog.I see bbpress but would like to add forum similar to stackexchange or stackoverflow. Please let me know.
6
votes
1answer
444 views

How to create a flexible abstraction for WP_Query?

My question is about php but it involves wordpress as i am creating a plugin. The case is that i have 5 questions, each question have 6 choices and one choice to choose from each. Now the person would ...
6
votes
1answer
2k views

How to show 'login error' and 'lost password' on my template page?

I'm providing front-end login in a template, using the function wp_login_form. It handles the redirection after login and logout pretty neatly! But if the username / password mismatch, or are non ...
4
votes
3answers
5k views

Custom Post Type Archives by Date and Taxonomy

Lets use the classic example of a custom post type called "movies", with its own taxonomy called "genre". By registering the custom post type (with a "movie" slug), the permalinks are already set up ...
11
votes
5answers
2k 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 ...
8
votes
1answer
2k views

Is it possible to paginate posts correctly that are random ordered?

I found this problem on Wordpress Support and the topic unfortunately is now closed. I have this same issue... (read below) We have created a site where members can recommend things like favourite ...
7
votes
5answers
3k views

How to rearrange fields in comment_form()

Im using a custom filter to change the fields, but can´t figure out how to change the order of the fields in the comment form. Desired order: comment field (first/top) name email website This is ...
5
votes
1answer
9k views

Rewriting a custom-post-type permalink with taxonomy term?

I'm trying to rewrite my url for a custom_post_type named wr_events with one of its custom_taxonomy terms from event_type add_action('init', 'wr_events'); function wr_events() { ...
5
votes
1answer
6k views

Form to Add Posts to Custom Post Type

Basically I want to display a form on my blog (on a certain page) that will allow anyone to fill it out and it will create a post in a custom post type. I saw the answer once before but I can't find ...
6
votes
2answers
687 views

Set custom name for generated thumbnails

Is there any filter available to set the naming convention of those auto generated thumbnails? Something like this: thumbnail_150x150.jpg -> thumbnail-s.jpg thumbnail_300x300.jpg -> ...
4
votes
3answers
7k views

Add Plugins to Wordpress Theme

I'm creating a wordpress theme that I aim to sell at some point. Now, I've discovered that some of the wordpress.org plugins would be great for things that I want to do. They already hold much of the ...
4
votes
2answers
12k views

Check for correct username on custom login form

I have used Jeff Star's tutorial for creating my own custom login form http://digwp.com/2010/12/login-register-password-code/. It works great, but I have one problem. On the reset password form, if ...
3
votes
4answers
6k views

How to restrict access to uploaded files?

I have a restricted area on a website that can only be accessed by logged in users. For that I created a page template with a 'current_user_can()' condition. My problem is that the documents attached ...
2
votes
1answer
1k views

How to quickly switch custom post type singular template?

I have a custom post type called movies and I need to quickly switch the template that displays the movies cpt on the front end via a link. How can this be done? Files I have: single-movies.php ...
12
votes
6answers
10k views

meta_query with meta values as serialize arrays

I'm working on a project in which I'm creating a custom post type and custom data entered via meta boxes associated with my custom post type. For whatever reason I decided to code the meta boxes in ...
9
votes
2answers
745 views

How do themes provide support for child themes?

One of the requests on themeforest is that themes are required to provide child theme support. I know what child themes are, although I haven't worked a lot with them, but I would like to know is ...
7
votes
2answers
3k views

How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button

I have a custom post type (called contacts). Since this post type is not working like a post, I don't want to show SAVE DRAFT, PREVIEW, Status, Visibility or Publish Date. The only options I want to ...
6
votes
1answer
1k views

Allow Editors to edit pending posts but not draft ones

I have a large number of users with Editor Capabilities that help to go through the post submissions. This is my current setup for this role: As you can see, they are allowed to edit_posts and ...
5
votes
7answers
3k views

What are options are there to implement a multi language site

What is the best way to have multiple languages on a site? I was thinking of using WP3.0 and then having each language of the site being a seperate blog in a sub directory. I.E. example.com ...
3
votes
1answer
4k views

Remove parent category from permalink? Basically only have the child category?

I think there used to be an out-dated plugin to do this. Is there any way to do this easily with just a little code? We prefer not to rely on a plugin since that makes us dependent on the developer ...
3
votes
3answers
2k 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 ...

15 30 50 per page