Joe's Quest

Custom Fields and Category Order in Atahualpa Theme

Atahualpa theme for wordpress
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):
Open /wp-content/themes/atahualpa332/functions/bfa_postinfo.php
Find line 10
[coolcode lang=”php”]return get_post_meta($post->ID, $matches[1], TRUE);[/coolcode]
Replace with the following lines
[coolcode lang=”php”]
ob_start(); the_ID(); $post_id = ob_get_contents(); ob_end_clean();
return get_post_meta($post_id, $matches[1], 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.
Open /wp-content/themes/atahualpa332/functions/bfa_hor_cats.php
Find line 3
[coolcode lang=”php”]
$list_cat_string = wp_list_categories(‘orderby=’ . $sort_order . ‘&order=’ . $order . ‘&title_li=&depth=’ . $levels . ‘&exclude=’ . trim(str_replace(” “, “”, $exclude)) . ‘&echo=0’);
Replace with
[coolcode lang=”php”]
$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.

Discussion (2)

There are 2 responses to “Custom Fields and Category Order in Atahualpa Theme”.

  1. Thanks for this about the category order, I am struggling with my new wordpress site and this has solved something that has really bugged me all the week. Thanks!

  2. Hi. Great post. My friends referred your blogs to me. It looks like everyone knows about it, just not me, until now. Definetely will read your other posts, too. Thank you for sharing with us. Take care. Recommend. Web Designer great site. Like it! 🙂

Leave a Comment

Your email address will not be published. Required fields are bold.