a blog about handmade code

blog

Customizing Submitted By Theme

Customize the submitted by block by adding this code to the template.php. Remember to change the bolded theme_name_preprocess_node with the name...

Optimizing CSS and Javascript by Compression

When optimizing css and javascript it can be done with a few clicks. The best way to optimize it, is by compressing and caching both.

...

មួយម៉ឹនអាល័យ ស៊ីន ស៊ីសាមុត​ Mouy Mern Alai

This song is just classic. I've accidentally run across it and was in trance with the wonderful song of sadness and love. Its a song about guy...

Getting categories for a post

For more control over the post's category, use wp_get_post_categories function. It is a simple solution than doing a custom query. It requies...

Tags: php, wordpress

Finding the user id on Phpfox 2.0+

Simple enough, i had to go through code to find it. I totally forgot about the api at http://www.phpfox.com/phpapi/Phpfox/Phpfox.html.

$...

phpfox accessing user group settings and variables

Accessing the User Group Settings (variables)

Lets say you want access to the user group setting for the blogs and find if they can add a...

Tags: php, phpfox

Grabbing Custom Fields and Values

Getting the custom field can be fast. Here's an example.

<?php
global $post;
$map_location = get_post_meta($post->ID, '...
Tags: wordpress

Getting a Post Count in Wordpress

Finding the total post can be grueling. The easiest way is to find the post count from the query. Here's the code:

$total_post = $wp_query-...

Pages

©2012 Tranzic Media / Portfolio of Vasna Sdoeung