Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

get_avatar function doesn't work


  #1  
Old Dec 7, 2012, 10:23 PM
ghostsquad
 
4 posts · Dec 2012
get_avatar function doesn't work

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
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
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 03:42 AM.


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