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 »

[SOLVED] Author Name on Single.php


  #1  
Old Oct 6, 2012, 02: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, 04:50 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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, 06: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, 08:43 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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, 08:05 AM
ganterd
 
4 posts · Oct 2012
Any update yet?
  #6  
Old Oct 14, 2012, 11:36 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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 05:47 AM.
  #7  
Old Oct 27, 2012, 09: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, 10:07 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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, 02: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, 08:32 AM
NickMackz
 
1 posts · Nov 2012
Any progress on this? I have the same issue.
  #11  
Old Nov 20, 2012, 09:00 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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, 08: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 08:16 PM. Reason: had made error
  #13  
Old Jan 28, 2013, 12: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, 07:24 AM
ganterd
 
4 posts · Oct 2012
Excellent, thanks very much!
  #15  
Old Mar 13, 2013, 03:53 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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



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 03: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 03:46 PM
Permalink in single post and single page anup Center area post/pages 0 Jul 15, 2010 09:46 AM
Styling %author% and %author-posts-link% Aris Post-Kicker, -Byline & -Footer 2 Jul 6, 2010 10:34 PM
%author-linked% and "All posts by this author" David Latapie Post-Kicker, -Byline & -Footer 2 Nov 1, 2009 06:53 PM


All times are GMT -6. The time now is 05:03 AM.


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