WordPress Development Weekly Newsletter
WordPress Development Weekly Newsletter

Top new questions this week:

Is there a JavaScript API? How to access public and private data in JS?

According to this post there is no built-in JavaScript API for Wordpress. Therefore developers who want to build on AJAX seem to come up all with their own solution which doesn't seem right to me. ...

<ajax> <javascript> <wp-enqueue-script> <api> <wp-localize-script>  
asked by mc007 5 votes
answered by G. M. 6 votes

How Can I Add a Filter to Class Instance Only?

I have a custom class which I use for several cases extending it, for example class A { public function show_things() { print_r( apply_filter( 'yet_another_filter', array( 'coffee', ...

<plugin-development> <filters> <oop>  
asked by uruk 4 votes
answered by G. M. 5 votes

Post doesn't show date if there's another post with the same date

I have custom post type "press." and made a page template the queries posts of that type. The posts are supposed to show their published date, but if there are more than one posts with the same date, ...

asked by Jaeeun Lee 3 votes
answered by Robert hue 3 votes

How to name files of namespaced classes?

WP Core Handbook > PHP Coding Standards > Naming Conventions suggests the following for naming files with classes: Class file names should be based on the class name with class- prepended and ...

<oop> <coding-standards>  
asked by Rarst 3 votes
answered by toscho 1 vote

post_mime_types Filter not Working in List Mode

I'm using the following code to add new sorting options to my Media Library: function modify_post_mime_types( $post_mime_types ) { $post_mime_types['application/pdf'] = array( __( 'PDFs' ), __( ...

<filters> <wp-admin>  
asked by Drath 3 votes

How to update widget from widget() function?

I'm trying to create a simple linkroll widget for displaying recent https://pinboard.in links via their API. To maximize loading speed, I want to cache the linklist in a widget field, as well as the ...

<widgets> <save> <update-option>  
asked by Hans Spieß 3 votes
answered by Rarst 3 votes

Is there a way to improve or optimize this query_posts query? It's very slow

I have a fairly large database - 113,299 rows in wp_posts and 216,0649 rows in wp_postmeta. There is one custom query that I run after a post is added or edited, which appears in MySQL's slow-log ...

<database> <query-posts> <performance>  
asked by Biranit Goren 2 votes

Greatest hits from previous weeks:

Get excerpt using get_the_excerpt outside a loop

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work? This code is inside a plugin called "WP Facebook Open Graph protocol". Here's the ...

<excerpt> <loop> <the-excerpt>  
asked by ariel 5 votes
answered by ariel 2 votes

Translate widget titles using qTranslate plugin

I'm actually using the qTranslate plugin to translate my website. It works really well with everything except one thing. the titles of my sidebar widgets. Actually, to translate some words we need to ...

<widgets> <sidebar> <title> <translation> <plugin-qtranslate>  
asked by kschaeffler 5 votes
answered by kschaeffler 7 votes

Can you answer these?

Changing admin default setting values

I would like to know if it is possible to change the default admin setting options. This question may seem a bit unnecessary but it is because I have a specifically designed multisite and so would ...

<multisite> <admin> <settings>  
asked by user3438958 1 vote

How can I speed up my WP admin section?

We have many WP sites with a proxy in between the servers that they sit on and the internet. Some things in WP simply don't work: RSS feeds on dashboard looking up themes looking up plugins core ...

<admin> <proxy>  
asked by STing 2 votes

Different Custom Post Types for each Network site

I have a WP Network of two sites to use the Multilingual Press plugin ("Site-A" and "Site-B"). They both have a Custom Post Type, say "CPT-A", which I registered manually in functions.php. How do I ...

<custom-post-types> <multisite> <localization>  
asked by Phi Lieb 1 vote
Subscribe to more Stack Exchange newsletters

Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3