0
votes
1answer
2k views

How to paginate a list of tags

I have a page that displays a list of all tags of my blog. Iuse this code which works fine: <?php $poststocount=get_tags($args); echo '<h2>Alphabetic Index of All '</h2>'; ?> ...
21
votes
4answers
7k views

Database synchronization between dev/staging and production

I have a problem with WP 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 the ...
17
votes
1answer
8k 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 (ie supplier_name). I would like to be able to search and filter my posts ...
49
votes
6answers
3k views

Updates for a private plugin?

If I write a private plugin, is there any way to use the WordPress auto-update mechanism to update it? I want to encapsulate the functionality, but it's specific to my own 5 or so blogs, so it's not ...
22
votes
8answers
5k views

User-friendly cropping of post thumbnails?

Is there a way to let my users define the crop area of a post thumbnail? The thumbnails always are existing post attachments, I would rather not create an extra attachment per thumbnail. The post ...
11
votes
8answers
7k views

Remove taxonomy slug from a custom hierarchical taxonomy permalink

I created a 'forum' taxonomy, using these rules: register_taxonomy( 'forum', array('topic'), array( 'public' => true, 'name' => _a('Forums'), 'singular_name' => ...
11
votes
5answers
3k views

Resizing images to the actual size used in the editor?

Is there a way to resize images to the actual size they will be shown in the post? I have users that import a large image and then resize it in the visual editor. This is easy, since they can just ...
12
votes
5answers
10k views

Include custom taxonomy term in search

I have two custom taxonomies applied to two custom post types. the terms list on the sidebar just fine and will list all posts associated with it. However, if you search one of the terms in specific, ...
9
votes
4answers
16k views

How to manually fix the WordPress gallery code using PHP in functions.php?

It's been talked many times that Wordpress outputs some really bad code for the built-in gallery function. This is the core code responsible for the gallery output (in /wp-includes/media.php): ...
10
votes
1answer
4k views

How to manage ajax calls and JSON in wordpress

I have a custom post type that i want to access through jQuery - preferably using JSON. So first things first. creating a function that returns/echos json is easy enough, but how would I access it ...
8
votes
1answer
5k views

How to add defer=“defer” tag in plugin javascripts?

I couldn't add defer tag in plugin javascripts. Google developer pagespeed test suggests me to add defer tag in contact form 7 javascripts. This is how contact form 7 includes javascript in header. ...
13
votes
6answers
12k views

Extra TinyMCE editor strips <p> and <br> tags?

Hey guys, I've added a TinyMCE to some textareas that are displayed in a custom meta box. All of the formatting works perfectly fine, except that the editor will not save <p> or <br/> ...
10
votes
2answers
1k views

Does the functions.php file ever get called during an AJAX call? Debug AJAX

Trying to figure out an issue a fellow programmer is having. I was wondering if the functions.php file get called at all when you do admin side AJAX? I know that when you do an AJAX call a part of ...
7
votes
2answers
5k views

Display Media Uploader in Own Plugin on Wordpress 3.5

I have little problem with Media Uploader in new WordPress 3.5. I created own plugin which is upload the picture. I'm using this code JS: <script type="text/javascript"> var file_frame; ...
7
votes
1answer
3k views

Custom bulk_action

I would like to add a custom bulk action to a custom post type. I came across the filter bulk_actions-screenid, which according to its documentation, would do exactly as I wish. However, after about ...
7
votes
4answers
6k views

Theme Activate Hook

I would like to write a function to email me the URL of the website when my theme is activated. What is the hook initiated when the theme is activated?
4
votes
4answers
11k views

Custom Taxonomy WP_Query for All Terms in a Taxonomy?

Is there an easy way to query for any posts that is tagged with any term from a particular taxonomy? I know this technique: $custom_taxonomy_query = new WP_Query( array( 'taxonomy_name' => ...
5
votes
4answers
3k views

Optimizing a Proximity-based Store Location Search on a Shared Web Host?

I've got a project where I need to build a store locator for a client. I'm using a custom post type "restaurant-location" and I have written the code to geocode the addresses stored in postmeta ...
2
votes
3answers
3k views

Creating 301 Redirects for Post, Page, Category and Image URLs?

I fear this may be too much to ask here, so if so, please feel free to tell me of another place to learn. Help with Redirections I'm cleaning up a badly developed site and migrating wordpress from a ...
10
votes
2answers
708 views

Strategy On Building Plugin Using Eclipse

Anyone who has experience in building wordpress plugin using eclipse PDT? My situation is: I need to build plugin that extend another plugin (look at it as premium version from another plugin) I ...
3
votes
3answers
3k views

Adding jquery and thickbox to WordPress theme

I would like to add thickbox for the template which I develop to WordPress. At this time I'm trying with a clean template that have only header.php, footer.php,index.php, and functions.php. I've ...
1
vote
1answer
674 views

Export data as CSV in back end with proper HTTP headers

I wrote a plugin that displays all products in a woocommerce store in admin settings option, now I want to add a link to download the products as CSV file. The problem is, when I click the link I get ...
55
votes
8answers
16k 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 ...
23
votes
1answer
13k views

Create custom page templates with plugins?

Is it possible to make custom page templates available from a plugin?
29
votes
13answers
2k views

How do you debug plugins?

I am pretty new to plugin authoring and was having a hard time debuging. I used lots of echo and it is sloppy and ugly. I am sure there is a better way to do this, maybe an IDE with a debugger that ...
20
votes
5answers
7k views

Change the default-view of Media Library in 3.5?

When inserting media into a post, is there a way to change the default-view of the Media-Library from "All media items" to "Uploaded to this post"? There is another thread where this question was ...
22
votes
7answers
8k 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 ...
10
votes
2answers
3k views

Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?

I need to create a custom post meta box(es) for my custom post type "Slideshow" (this post type is already created). Each metabox will hold the content in each slide slide and save it to ...
22
votes
2answers
4k views

How Do I Configure Automatic Updates in WordPress 3.7?

WordPress 3.7 added automatic updates. How does this work, and how can I configure this feature?
12
votes
1answer
3k views

Limit image upload to one and disable audio, video and other document file types to upload

Somebody knows some trick in Add new Post to: Disable the upload of audio, video and other filetypes. Only accept the upload of an image (jpg, png, gif). Limit the upload of each Post to only One ...
14
votes
2answers
6k views

Difference Between Filter and Action Hooks?

I have been looking at the plugin API a bit more in depth recently and I was wondering what real differences there were between action and filter hooks. They both are events that receive data as a ...
13
votes
5answers
11k views

getting all values for a custom field key (cross-post)

I know how to get a custom field value for a specific post. get_post_meta($post_id, $key, $single); What I need is to get all the values associated with a specific custom post key, across all ...
11
votes
2answers
4k 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 ...
5
votes
5answers
12k views

How to split a loop into multiple columns

If I have a loop running from a category query like : <?php $the_query = new WP_Query('cat=1&showposts=50&orderby=title&order=asc');?> <ul> <?php while ...
12
votes
3answers
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 ...
16
votes
3answers
5k views

Adding categories to custom post type in permalink

I know people have asked this before and have gone as far as adding the custom post type, and rewrite for permalink. The problem is I have 340 existing categories which I would like to continue ...
7
votes
4answers
8k views

How to set default screen options?

I'd love to be able to hide meta boxes using screen options, instead of removing them or restricting them to user roles, the goal is to just "uncheck" the meta box for the user. I see how this would ...
8
votes
2answers
9k views

What is the correct way to use wordpress functions outside wordpress files?

I read about 2 methods for initializing wordpress function outside of wordpress files so We can use these functions on any page or website outside the wordpress blog. Which one of these 2 methods is ...
4
votes
1answer
491 views

What is the index [0] for on post meta fields?

Trying to improve my PHP knowledge through test and try! I am confused on [0] arguments at following WordPress PHP code global $post; $custom = get_post_custom($post->ID); $price = ...
2
votes
2answers
5k views

Dynamic navigation for custom post type (pages)

I have a set of custom post types with the capability_type argument set to 'page' I want to include these in wp_list_pages() or similar so I can use the dynamic classes (such as .current_page_item ...
18
votes
10answers
1k views

Contact Form on WordPress Sites?

How does one go about building a page in wordpress that contains a contact form full of custom fields, boxes, inputs, etc. completely determined by the author of the site. It seems odd that wordpress ...
4
votes
2answers
1k views

Responsive Theme Design: how have slideshow on desktops/tablets and static photo on mobile using same template?

I am building my first responsive WP site with my own custom WP Theme. The primary templates are part fluid, part fixed. This enabled me to create only 3 "versions", a desktop, tablet and mobile ...
14
votes
3answers
10k views

How to get WordPress Time Zone setting?

Can someone tell me how to get the time zone that is set in the WordPress Admin? For example, if the blog is set to Eastern time, I need this exact string to print out: US/Eastern This is for a ...
8
votes
4answers
2k views

Is there a WordPress plugin that registers a plugin file as a custom page template?

I need to create a plugin that makes custom page templates available in wp-admin. I'm wondering if someone has tackled this already, as it seems like a pretty typical process?
4
votes
1answer
1k views

How to make simply “report” button on posts

I'm building up a video-site using wordpress. It embeds videos from different sites. I really need a simply "Report broken video"-button that saves the url in a database or emails it to me. I've ...
4
votes
1answer
307 views

How to return loop contents

At times, I need to return the output of a loop (usually with WP_Query like in this example) for use in a shortcode or with a filter on the_content. The following code that uses object buffering ...
3
votes
1answer
1k views

Exclude Specific Term from Search

It is possible to search for posts with a specific term by appending the URL with: ?&term=abc Is it possible to do the opposite and search excluding a specific term? Something like: ...
2
votes
3answers
698 views

excerpt in characters

I have code in functions.php: function string_limit_words($string, $word_limit) { $words = explode(' ', $string, ($word_limit + 1)); if(count($words) > $word_limit) array_pop($words); ...
2
votes
2answers
4k views

paginate_links() don't properly work in search.php?

I'm using this in my search.php template … <div class="pagination"> <?php echo get_pagination_links(); ?> </div> And this is the function … function get_pagination_links() { ...
2
votes
1answer
6k views

Any examples of adding custom fields to the category editor?

I think I'm pretty close to cracking this nut :) I'm trying to add a set of custom fields to the Category editor. Since I'm not dealing with post meta, I believe I'll be writing my custom category ...

15 30 50 per page