Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

get_avatar function doesn't work


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Dec 7, 2012, 10:23 PM
ghostsquad
 
4 posts · Dec 2012
The following code does not work in the Montezuma theme. It does work on the default Twenty Eleven theme.

This is important, because I want to be able to show the avatar of the author of each post (multi-author blog) right on the home page. kind of like at penny-arcade.com

PHP Code:
 echo get_avatar(get_the_author_meta('user_email')); 

Last edited by ghostsquad; Dec 7, 2012 at 11:00 PM.
  #2  
Old Dec 8, 2012, 01:09 AM
ghostsquad
 
4 posts · Dec 2012
I figured out what's causing this code to not run.. kinda..

bfa_get_whitelist()

essentially, there's a white list of php functions that can run. I've tried adding "get_avatar" to the list, but it didn't work. I'm so very confused about why I can't run my own php.. why was this implemented?
  #3  
Old Dec 8, 2012, 01:56 AM
ghostsquad
 
4 posts · Dec 2012
Ok, I read the Mentezuma options a bit more regarding sub templates and what not. Sounds like if you want to do whatever you want to do (any php code), you gotta use a sub template.. ok that's fine. But how do you include it. The "readme" talks about "bfa_get_template_part", but that function isn't in the whitelist. So how do you actually include custom sub templates? I guess what I'm really trying to do is modify postformat.php which is it's own subtemplate.. I don't really want a new "postformat" template at this time, because I want to change what the default looks like... this is all very frustrating, and really makes me want to just start over with a different theme and code this myself. Can anyone help?
  #4  
Old Dec 8, 2012, 07:04 AM
juggledad's Avatar
juggledad
 
21,684 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
The reason you can't just run any php is that WordPress banned the use of the eval() function in themes. So in order to add psuedo php in, Montezuma has to have a link to the function in the code so it can parse the psuedo code, recognize it and them call the appropriate function.

I sent a suggestion about having a user white list added to the theme about a month ago
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
get_avatar and the post footer KarlHvM Center area post/pages 1 Oct 12, 2012 01:05 PM
Adsense doesn't work in homepage, but work in other pages. JavaBen Header configuration & styling 1 May 24, 2010 05:48 AM
'Read more' function won't work GlobalNeat Excerpts, Read more, Pagination 12 May 5, 2010 06:32 AM
SwitchLang Function Lyryanne Atahualpa 3 Wordpress theme 0 Feb 2, 2010 04:46 AM


All times are GMT -6. The time now is 12:59 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.