It is very easy to create a new post type in WordPress, you just need to call the register_post_type() function with all of it's configuration array and the post type will be visible and ready for use.
But if you choose not to utilize the default "title" in the register_post_type() arguments then most likely all of the newly created post under the custom post type will be give "auto-draft-xxx" as it's post title and post name.
Why to do this?
It may be a strange to hear when someone wanted to load a CSS file dynamically or even try to unload it.
Sure you can use jQuery to style the elements by adding inline styling, and removing the inline style using jQuery is not hard to do either.
Wordpress Media manager is a very good tools, but it was designed to act as media pools for all user in the site, sometimes we want to limit the media displayed in Media uploader to show only the media that current user actually owned.
In that case we will need to add a filter to wordpress query, an additional sql query limit that will limit the searched data for media file owner only.
We can add a new filter by invoking the filter 'parse_query' like this :
It is possible to register custom taxonomy in wordpress programmatically by utilizing the register_taxonomy() function, it can be done from widgets, theme or plugins.
The key is to invoke the function in wordpress init hook, so it the custom taxonomy will be registered before other function that may call or use it later on.
Sample of hooking into wordpress init hook :
Gladly to announce we finally bring back our WordPress Themes to Live http://www.victheme.com/catalog?category=22 By doing makeover in our design and working hundreds of hours creating our own WordPress framework which you can check the DEMO here http://zetaone.victheme.com/wp-admin/ we hope our new themes is with greatly use for all WP users, from designers, developers and Blog owners.
We welcome any comments and Enjoy everyone!
You can easily code in a metatag to display on certain domain only when use domain access module. Valid example for this is when you have a multiple domain installed on the same directory and utilizing domain modules to switch between different domain, and you don't want Google or any search engine robot to crawl some domain.
You may argue that this can be done via robot.txt, and for multiple domain some fancy .htaccess rule with redirection to different robot.txt files for each of the domains respectively. The answer is yes, you can achieve the same results with this way too.
After neglecting one of my websites for a couple month, I decided to do some maintaining and logged in to the site as admin. To my surprise, eventhough the site is "Protected" by mollom as spam protector, I got 132.149 unapproved SPAM comments.
Sometimes when building an advanced Drupal form that involves form_alter plus including files you will encounters problems that Drupal is complaining about a missing functions that is in your include file.
This problem usualy happen if your form submit function utilizes $form_state['rebuild'] = TRUE or invoked via ajax. Drupal form system is smart enough to auto load all of your include files if you call it using module_load_include() function, or form_load_include() function.