Custom Fields and Category Order in Atahualpa Theme
Atahualpa is a wonderful WordPress theme that can be customized with 200+ options. It can be use to build simple websites with a bunch of settings. I found that custom fields can not be displayed as it described. I’m not sure if it’s a bug. I did some modifications and it works now. Here is how (For version 3.3.2):
Find line 10
- return get_post_meta($post->ID, $matches, TRUE);
Replace with the following lines
- ob_start(); the_ID(); $post_id = ob_get_contents(); ob_end_clean();
- return get_post_meta($post_id, $matches, TRUE);
I don’t know why $post->ID can not get the post’s id. And the way above is not efficient, but it works.
Now you can use the custom files with the tag %meta(‘fieldname’)% in the theme options -> Post/Page Info Items.
I also would like to manually arrange the order of categories. This function is not built in. There are some plugins can make it happen. I’m using Category Order. Some modifications should be done in Atahualpa too.
Find line 3
- $list_cat_string = wp_list_categories('orderby=' . $sort_order . '&order=' . $order . '&title_li=&depth=' . $levels . '&exclude=' . trim(str_replace(" ", "", $exclude)) . '&echo=0');
- $list_cat_string = wp_list_categories('&title_li=&depth=' . $levels . '&exclude=' . trim(str_replace(" ", "", $exclude)) . '&echo=0');
This removes orderby, order parameters to meet the requirement of Category Order plugin.