Jump to content


Photo
- - - - -

Display tags on frontpage

tag frontpage

Best Answer Danny , 06 May 2014 - 12:32 PM

Try adding the following code to your child themes functions.php file.

 

function tags_in_excerpt() {
  printf(
          '<div class="p tags">%s&nbsp;</div>',
          get_the_tag_list(
            __( "<span class='note'>Tagged with &rarr;</span> ", 'pagelines' ),
            ' &bull; ',
            ''
          )
        );
}
add_action('pagelines_loop_after_excerpt', 'tags_in_excerpt');
Go to the full post


  • Please log in to reply
5 replies to this topic

#1 rpacker

rpacker

    Super Member

  • Members
  • 225 posts
  • LocationWashington, DC
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 05 May 2014 - 08:58 PM

Pagelines by default only displays tags on the individual post page. Is there a simple way to have them appear on a full post feed displayed on the frontpage?

 

Thanks!

 

Please Login or Register to see this Hidden Content



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15818 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 06 May 2014 - 09:46 AM

Hi,

 

When you say tags on individual posts, are you referring to the Tags widget ?



#3 rpacker

rpacker

    Super Member

  • Members
  • 225 posts
  • LocationWashington, DC
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 06 May 2014 - 12:15 PM

I am not talking about the tag cloud widget, but rather the tags that are associated with a post. They only appear on the individual post page in Framework, and I would like to see them on my excerpted frontpage as well.

 

Thanks.



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15818 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 06 May 2014 - 12:32 PM   Best Answer

Try adding the following code to your child themes functions.php file.

 

function tags_in_excerpt() {
  printf(
          '<div class="p tags">%s&nbsp;</div>',
          get_the_tag_list(
            __( "<span class='note'>Tagged with &rarr;</span> ", 'pagelines' ),
            ' &bull; ',
            ''
          )
        );
}
add_action('pagelines_loop_after_excerpt', 'tags_in_excerpt');


#5 rpacker

rpacker

    Super Member

  • Members
  • 225 posts
  • LocationWashington, DC
  • Framework Version:2.3.5
  • Country: Country Flag

Posted 06 May 2014 - 07:10 PM

Thank you, I'll give it a try as soon as I setup a child theme.



#6 greenfly

greenfly

    Advocate

  • Members

  • 3268 posts
  • LocationManchester, England
  • Framework Version:latest
  • Country: Country Flag

Posted 06 May 2014 - 07:21 PM

Great - let us know how you get on and if we can help with this :) 







Also tagged with one or more of these keywords: tag, frontpage