Posts

Showing posts from November, 2015

Wordpress (Custom) Post Type, Taxonomy, Tags, Term In One Image

Image
I know that for wordpress beginner, it is quite difficult at first to understand the real relationship between (Custom) post type, taxonomy , tags, category, terms and so on. Yes, I have been there and now I understand it.  That's why I create the below image to illustrate it all, in order to cut time to learn it from here , which is not very clear.  It would be very useful for people who write wordpress program also. Wordpress (Custom) Post Type, Taxonomy, Tags, Term in One Image How to read it? I use default value in wordpress and custom post type to illustrate the idea. This image is read from left to right.   The highlight doesn't mean anything, just to split it so that you can read it clearly only. Post Type Wordpress default post type includes, at least, post and page.  But post type is not limited to post and pages, it can also be other thing (known as "Custom Post Type").  Cars, Food, Sports and other thing can also be post type

iOS push message using PHP - Success but push message not receive in iPhone

There are several things to check.  Ask yourself these questions: Are you using correct device token? Are you successfully telnet/ping the push message server (start with ssl://) Did your network set to block outgoing connection to push message server? Did your network set to block getting device token? Are you using correct certificate? The last point is most critical: An app build using distribution cert WOULD NOT receive push message using development cert, and vice versa. Make sure you are using correct cert when you are doing your test. Hope it helps someone.

PHP Upload File Through REST: Using HTTP POST JSON data Return Blank Page

If you are: Using REST API (XML RPC Hybrid, a.k.a. calling URL) Submit a large volumn of data (e.g. 10MB) through JSON base64 string Submit using HTTP POST to a URL Get a blank page (no return) after submit No error log  Check these 3 things: In your php.ini: upload_file_size has big enough value.  e.g. 10MB or 15MB post_max_size has big enough value.  e.g. 10MB or 15MB memory_limit has big enough value.  e.g. 128MB If you just changed the first two and still get blank page when you upload, chances are you have already exhausted your memory.  Raise your memory so as to make the page load. It is particularly useful if you are using mobile service (iPhone, Android) to upload image to server using base64.   Hope it helps someone.

[Solved] bbPress Chinese (Taiwan/China) language file not working!

OK.  Simply put: If you are following this link about how to use bbPress in your language , and follow these two instruction: How to use the language files Rename each file of the files to  bbpress-language_COUNTRY.extension eg.  bbpress-plugin-pt-br.po  to  bbpress-pt_BR.po and  bbpress-plugin-pt-br.mo  to  bbpress-pt_BR.mo . Note: Ensure you use the  -  and  _  in the correct place per the above example. Using FTP upload both the  .po  and  .mo  files to  /wp-content/languages/bbpress/  of your WordPress instalation. If the  /wp-content/languages/  and  /wp-content/languages/bbpress/  folders do not exist, create them. In case you found yourself, like me, do the following, it WON"T WORK! bbpress-pt_zh_TW.po bbpress-pt_zh_TW.mo The correct name should be bbpress-zh_TW.po bbpress-zh_TW.mo Same thing for zh_CN Hope it helps someone.

Wordpress Types plugin: How to get child custom field in parent custom field

Wordpress Types is actually a good plugin.  To certain extended it is much better than ACF  (e.g. Types has a free "repeater" field but in ACF it is a paid function). OK.  Today my problem is this: - I created a custom field "Program" using WP Types (Types for short) - I also have a custom field "Program Fee" that is a child of "Program".  (Why not taxonomy? Because "Program Fee" has multiple items and is different for different program.  In this case using "Custom Field" is better than "Taxonomy") The way to do it is explained very clearly here  , here and here .  (By the way, I got these 2 links from Google, not from their official site....) Now the problem is: I want to get "Program Fee" from specific "Program".  i.e. getting all child custom field from a specific custom field... Unfortunately, up to this moment, the official site did not have clear instruction on how to do that.