Moving the byline to the top

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Moving the byline to the top

Postby yagottagotomo1 » 28 Dec 2009, 15:49

How can I move the author byline from the bottom to the top? I've tried in the actions.php file and have only succeeded in butchering things. Any help would be appreciated.
yagottagotomo1
 
Posts: 2
Joined: 28 Dec 2009, 15:48

Re: Moving the byline to the top

Postby sayontan » 30 Dec 2009, 13:06

If you are willing to tinker with actions.php (seems like you are!), this is what you should do:

1. Go to actions.php and look for the function suffusion_post_footer.
2. Comment out these lines:
Code: Select all
   if ((!is_page() && $suf_post_show_posted_by == 'show') || (is_page() && $suf_page_show_posted_by == 'show')) {  ?>
         <span class="author"><?php printf(__('Posted by %1$s at %2$s', 'suf_theme'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a>', sprintf(get_the_time(get_option('time_format')))); ?></span>
        }

3. Go to the function suffusion_print_post_page_title. Depending on whether you want to replace the category or the comments with the author info, replace all occurrences of their code (including the if loops) with the code you just commented out in the other function.

Mind you, though the change is easy it involves a good bit of testing.
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas

Re: Moving the byline to the top

Postby yagottagotomo1 » 30 Dec 2009, 19:24

Thanks. I did it, works like a charm.
yagottagotomo1
 
Posts: 2
Joined: 28 Dec 2009, 15:48

Re: Moving the byline to the top

Postby anasqai » 09 Jan 2010, 15:00

I kept getting "syntax error....... on line....." :P

I'm just so bad at this and is a total newbie to these. :oops:

I'll just have to boldly ask you a favour, yagottagotomo1. :roll:

yagottagotomo1: Could you please send a copy of your edited actions.php as I want the author by line below the title post as well as my blog has two authors, it'll make it easier for readers to see the author without having to scroll down. :)

**EDIT: I saw your blog(googled your nick :lol:), that's how I want it to appear, but I saw the "am/pm" goes to next line instead?

BR,
Qai
anasqai
 
Posts: 13
Joined: 05 Jan 2010, 10:56

Re: Moving the byline to the top

Postby Karikuy » 17 Feb 2010, 21:35

no success at commenting out the lines, when I do so my site gets corrupted as I cannot see it or reach admin, have to access file on server, can someone post the comment out code, been using // but only seems to comment out the code partially, currently my actions file looks like this as well, a bit different from what sayontan posted.

Code: Select all
function suffusion_post_footer() {

   global $suf_post_show_posted_by, $suf_page_show_posted_by, $suf_post_show_tags;

?>

      <div class="post-footer fix">

<?php

   if ((!is_page() && $suf_post_show_posted_by == 'show') || (is_page() && $suf_page_show_posted_by == 'show')) {  ?>

         <span class="author"><?php printf(__('Posted by %1$s at %2$s', 'suf_theme'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a>', sprintf(get_the_time(get_option('time_format')))); ?></span>

<?php }

   if (!is_page() && $suf_post_show_tags == 'show') { ?>

         <span class="tags"><?php the_tags(__('Tagged with: ', 'suf_theme'),', ','<br />'); ?></span>

<?php } ?>

      </div>

<?php

}
Karikuy
 
Posts: 7
Joined: 17 Feb 2010, 18:05

Re: Moving the byline to the top

Postby Karikuy » 26 Feb 2010, 04:17

Figured it out, after you comment out suffusion_post_footer like this....

Code: Select all
<?php

   /*if ((!is_page() && $suf_post_show_posted_by == 'show') || (is_page() && $suf_page_show_posted_by == 'show')) {  ?>

         <span class="author"><?php printf(__('Posted by %1$s at %2$s', 'suf_theme'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a>', sprintf(get_the_time(get_option('time_format')))); ?></span>

<?php }*/


then in suffusion_print_post_page_title. you change

Code: Select all
if ($suf_post_show_cats == 'show') { ?>

               <span class="category"><?php the_category(', ') ?></span>

<?php   }


with this

Code: Select all
if ($suf_post_show_cats == 'show') { ?>

               <span class="author"><?php printf(__('Posted by %1$s at %2$s', 'suf_theme'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'">'.get_the_author_meta('display_name').'</a>', sprintf(get_the_time(get_option('time_format')))); ?></span>

<?php }


for all you non programmers out there.
Karikuy
 
Posts: 7
Joined: 17 Feb 2010, 18:05


Return to Support Requests

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], howdreamswork, qkopfkqn and 5 guests