Some time we shows the posts and there comments in sidebar. But what to do for show the comments for custom post type. It’s not well documented, but according to the codex, you can pass a ‘post_type’ variable in the … Continue reading
Category Archives: wordpress hacks
Change uploaded image name to post slug during upload using variables
If you want to rename files during upload and set their names to the post slug the files are beeing attached to, plus some random characters (a simple incremental counter will de just fine) to make the filenames different. In … Continue reading
Solved: qTranslate slug with Widget not working with pages
We just saw the issue with qtranslate slug with widget is not working for 0.5 version. URL is showing but URL is not opening and 404 page is opening. The problem was exactly at the function qTranslateSlug_filter_request inside de file … Continue reading
Send email through wp_mail in html format with wordpress
In wordpress we use the wp_mail function for sending email. Following parameters we use for wp_mail Parameters Simple example: We can use this code for contact form or in functions.php file For html format email from wordpress. we just need … Continue reading
how to integrate the wordpress with php or html
WordPress is very easy to work on. you can very easily integrate the wordpress with php or html site. There may be only a few features of WordPress you want to use when integrating it with your site, or you … Continue reading
How to add the custom post type with associated tags and category
Many times we use the custom post type in wordpress. Some times we need to category and tags for custom post type which are only associated. you can use the following code in funcations.php file. Please consult with your developer. … Continue reading
change permalinks as per your choice in wordpress using post_link filter
WordPress publishing URL you can change to anything using following function. Following wordpress hook is very important. You can publish article with different URL or domain also. Using your blog you can publish your article to another URL also. You … Continue reading
Solved for WordPress old and new versions – PHP Fatal error: Allowed memory size of 33554432 bytes exhausted
We got always following ERROR PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 10485761 bytes) in This issue with old and new wordpress versions both. First you need to increase memory limit for your php … Continue reading
How to remove first image from wordpress post with caption if caption is present
I struggled lot for this issue. Some times I only removed the first image. some times I removed first caption. I used the following code for first image removing. But I faced the some issues with that code. When first … Continue reading
How to show some posts to only registered users in wordpress
Some people want to show selected posts to only registered users in site. You can easily achieve this. You just need to create public and private category and publish your selected posts in private category. Use the following code in index.php … Continue reading









