Blog

[et_pb_section][et_pb_row][et_pb_column type=”4_4″][et_pb_blog admin_label=”Blog” fullwidth=”off” posts_number=”10″ include_categories=”23″ meta_date=”M j, Y” show_thumbnail=”on” show_content=”off” show_author=”off” show_date=”off” show_categories=”off” show_pagination=”on” background_layout=”light” /][/et_pb_column][/et_pb_row][/et_pb_section]

WordPress meta queries

Posted by on 10:05 am in blg | Comments Off

If you want to get a post with meta key show_on_homepage and meta value on, you can do it in the following way: $rd_args = array( 'meta_key' => 'show_on_homepage', 'meta_value' => 'on' ); $rd_query = new WP_Query($rd_args); If you need to query all posts except the ones with this pair of meta key and value, you can use the following parameters: $rd_args = array( 'meta_key' => 'show_on_homepage', 'meta_value' => 'on', 'meta_compare' => '!=' ); $rd_query = new WP_Query( $rd_args ); Get Posts with a Specific Custom Field Value //...

read more

WordPress Hacks

Posted by on 10:04 am in blg | Comments Off

Here are few wordpres hacks that are very usefull while developing wordpress plugins and themes. Hide wordpress adminbar add_action('init', 'remove_admin_bar'); function remove_admin_bar() { if ( !current_user_can('administrator') && !is_admin()) { show_admin_bar(false); } } Show user/author posts only in admin By default wordpress displays all posts for any user logged into wp-admin. The following code restricts the post list by displaying only his posts. function wps_get_post_list_by_user($clauses) { if (is_admin()) { global...

read more

How to use Node.js

Posted by on 10:03 am in blg | Comments Off

read more

Working with TinyMCE

Posted by on 10:03 am in blg | Comments Off

You can not enhance the drop down list formatselect. But you can enhance with the hook tiny_mce_before_init the second drop down styleselect, there is hide in a default WordPress install. The documentation list all defaults and possibilities. inline – Name of the inline element to produce for example “span”. The current text selection will be wrapped in this inline element. block – Name of the block element to produce for example “h1″. Existing block elements within the selection gets replaced with the new block element. selector – CSS 3...

read more

Allow sub folders or subdomains inside magento website

Posted by on 10:02 am in blg | Comments Off

To allow browsing sub folders or sub domains inside a magento installation add following code to .htaccess file under main magento site. RewriteRule ^demo/ – [L,NC] before “RewriteEngine on” or “RewriteBase”

read more

Show errors in joomla

Posted by on 10:01 am in blg | Comments Off

Sometimes we may be struck with some errors like white screen of death and other errors. Then to know what causing the error simplifies our problem. To enable errors on joomla website do the following. Put the following code at the END of the configuration.php file BEFORE the closing ?> ini_set( ‘display_errors’, true ); error_reporting( E_ALL ); And also you can try following tips too, 1. Check server error logs (not access logs) if you have access to them. (cPanel or other control panels often allow this) 2. Go to Joomla...

read more