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 »

[SOLVED] Author Name on Single.php


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 Oct 6, 2012, 03:25 PM
ganterd
 
4 posts · Oct 2012
I'm having an issue with placing the author name in the right place on a single post page (single.php). I would like to have the author name between the post title and the tags field, but that doesn't work.

I'm trying to place the name has a h4 field like so: <h4><?php the_author(); ?></h4>

It doesn't work before the_content() is called, but starts working immediately after the_content() is called.

Am I missing something?
  #2  
Old Oct 6, 2012, 05:50 PM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
you might want to put it in the sub Template 'postformat'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 10, 2012, 07:49 AM
ganterd
 
4 posts · Oct 2012
Does this not change the format for the excerpts on the list of posts? I would like to add the author to the actual post page.
  #4  
Old Oct 10, 2012, 09:43 AM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
It seems that there is a problem with retreiving the author meta data. I have a message into the developer and am waiting a response.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 14, 2012, 09:05 AM
ganterd
 
4 posts · Oct 2012
Any update yet?
  #6  
Old Oct 14, 2012, 12:36 PM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
He is working on a new release but that is all I know at this point.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Oct 19, 2012 at 06:47 AM.
  #7  
Old Oct 27, 2012, 10:21 AM
baignoire
 
10 posts · Oct 2012
hi there,

not able either to sucessfully use "the_author_posts_link()" in single.php before "the_content()" is called in the template...

guess the same issue as mentionned by gantred... any news ???

this is quite embarrasing...

cheers
raf
  #8  
Old Oct 27, 2012, 11:07 AM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
I've reported it. If you put it AFTER the_content() it will work.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Oct 28, 2012, 03:28 AM
baignoire
 
10 posts · Oct 2012
Quote:
Originally Posted by juggledad
I've reported it. If you put it AFTER the_content() it will work.
yep, i saw this from previous posts. it remains a problem if you want something like :

______________________________
The post title
published by author on date

the content of the post
_____________________________

which is quite a common and logical display.

thanks for having reported anyway... will be waiting for upgrade

Do you think it should work better if a physical template is used ?? (i'll give a try and let you know...)

cheers
raf
  #10  
Old Nov 20, 2012, 09:32 AM
NickMackz
 
1 posts · Nov 2012
Any progress on this? I have the same issue.
  #11  
Old Nov 20, 2012, 10:00 AM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
I haven't heard anything from the developer.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #12  
Old Nov 23, 2012, 09:00 PM
RobertO
 
2 posts · Nov 2012
I made a separate main template for each author. So under Appearance>Montezuma Option>Main Templates I selected "add main template," I called it "Author's Name-Template," and I opted that it be a copy of the "single" template. Then I altered it so that right after the closing </h1> tag of the post title section I put in a line saying "<h3>Authors Name</h3>".

This means that each author always has to select a separate template -- but it does make it look good to the reader.

This may be too hokey for you, but in case it works for someone I wanted to share.

Last edited by RobertO; Nov 23, 2012 at 09:16 PM. Reason: had made error
  #13  
Old Jan 28, 2013, 01:22 PM
goater
 
2 posts · Jan 2013
Yay! I've solved it!

Edit three lines in the file called parse_php.php, starting at line 28, as follows:
Code:
	$need_loop = array( 'the_content', 'the_author' );
	// not only the_content needs loop
	if( ! in_the_loop() && in_array( $function_name, $need_loop ) ) {
So... Add the name of every single wordpress function (which requires the loop) you want to use to the $need_loop array.
Moreover, add !in_the_loop() constraint.

And that's all. Enjoy!
  #14  
Old Mar 5, 2013, 08:24 AM
ganterd
 
4 posts · Oct 2012
Excellent, thanks very much!
  #15  
Old Mar 13, 2013, 04:53 PM
juggledad's Avatar
juggledad
 
22,378 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Fixed with PATCH 113-06: the_author and other 'Limited PHP code' don't all work
__________________
"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
[SOLVED] How to enable Author drop-down list on single posts? vinceesq Center area post/pages 2 Sep 19, 2012 04:02 PM
[SOLVED] How to Add Author Description to Page generated by &quot;%author-posts-link%&quot; Steve41 Post-Kicker, -Byline & -Footer 3 Dec 15, 2010 04:46 PM
Permalink in single post and single page anup Center area post/pages 0 Jul 15, 2010 10:46 AM
Styling %author% and %author-posts-link% Aris Post-Kicker, -Byline & -Footer 2 Jul 6, 2010 11:34 PM
%author-linked% and "All posts by this author" David Latapie Post-Kicker, -Byline & -Footer 2 Nov 1, 2009 07:53 PM


All times are GMT -6. The time now is 04:22 AM.


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