How to query the custom fields by language?

In qTranslate, there is this function that “dispatch” the language with the kind of string you have. Haven’t tested it yet, but you could do something like: $myString = get_post_meta( $post_id, ‘Functions’, true); echo qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($myMeta); This will display the right language on your post based on the current page’s language.

Cron job not firing

It seems you are using your regular cron for that and it seems you are using the WP cron incorrectly in your example above. If you want to use wp cron in anything, this is the basic usage: if ( ! wp_next_scheduled( ‘wpcron_hook’ ) ) { wp_schedule_event( time(), ‘hourly’, ‘wpcron_hook’ ); } add_action( ‘wpcron_hook’, ‘delay_myposts’ … Read more

Can’t add custom Taxonomy to Custom Post Type

Note the parameter rules of both register_post_type: $post_type (string) (required) Post type. (max. 20 characters, can not contain capital letters or spaces) and register_taxonomy: $taxonomy (string) (required) The name of the taxonomy. Name should only contain lowercase letters and the underscore character, and not be more than 32 characters long (database structure restriction)

I want to extend the current themes’ single.php to display the meta fields of my CPT

Well, you could hook into the the_content filter, asking if it was a single custom post type and then replace the output with something you like. Something like this: function content_my_cpt_filter( $content ) { if (is_singular() && (get_post_type() == ‘my_cpt’)) { $returnage = $content; $returnage .= ‘Other Stuff that needs to be displayed on the … Read more

Apple push notification doesn’t work

OMG, finally, as the code runs from the plugin, the current working directory is set to wp-admin whereas when i run it manually it set for /wp-content/plugins… So, when the push function is called, just add the following line of code: chdir(ABSPATH . ‘wp-content/plugins/*your plugins folder name*/’);

Two text domains in one plugin

Yes, you can load multiple translation files for multiple text domains in one plugin. This is sometimes useful, for example when you need just one string in AJAX calls and many strings in the rest of the application: to make AJAX faster, load a separate translation. Be aware, automatic language updates for the plugin from … Read more