WordPress Plugin Development

How to Get All Post in WordPress Query

To get all the post in returned WordPress query results, you have to put: 'posts_per_page' => -1 in query arguments. For example: $all_posts = get_posts( array( 'post_type' => 'post', // e. g. custom_post_type 'orderby' => 'post_date', 'order' => 'DESC', 'posts_per_page' => -1, ) ); read more >>

Custom Post Type & Custom Taxonomy's URL Rewrite to remove their slugs

If you ever need to remove slug completely from your WordPress's URLs for Custom Post Type or Custom Taxonomy, set 'slug' to '/' and 'with_front' to 'FALSE' for rewrite parameter while registering custom post type or custom taxonomy. 'rewrite' => array( 'slug' => '/', 'with_front' => FALSE ), Don't forget to visit Settings->Permalinks page to flush old url rewriting rules to update changes. read more >>

How to configure (setup) Aptana Studio for WordPress Development

Sometimes Aptana Studio doesn't give code hinting for WordPress Development, if you face this problem, try this: 1. go to File -> New -> Other -> or just click ctrl+N. 2. New dialog window will open, from there choose Project under General Category, click next. 3. On Project Screen type a name for your project e.g. 'WordPress Development' and uncheck 'Use Default Location'. 4. Click browse button on the right for location and select your WordPress installation folder e.g. c:\xampp\htdocs\wordpress_development. Click Finish. 5. Now right click on your WordPress Development (your project created above) in Project Explorer and select Properties. 6. 'Properties for WordPress Development' window will pop up, from there click on 'Project Natures'. Check 'PHP' and 'Web' from the right panel, make sure… read more >>