Jump to content


Photo
- - - - -

Add Custom Fields to Bylines


This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1 tjrutkowski

tjrutkowski

    Advanced Member

  • Members
  • 41 posts

Posted 04 January 2011 - 03:25 AM

Hello: I see the Platform options to select post byline metadata. Additionally, I would like to include additional Custom Fields that I have added to my individual posts. Can you tell me how to add a Custom Field value to my Byline? Many thanks! site: www.bookinwithsunny.com

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 04 January 2011 - 07:46 AM

There is a hook for this... try adding code (to Base) as follows: ` add_action('pagelines_loop_metabar_end', 'addthistobyline'); function addthistobyline(){?> my byline code or html

#3 tjrutkowski

tjrutkowski

    Advanced Member

  • Members
  • 41 posts

Posted 05 January 2011 - 02:50 AM

That's it, thank you very much!

#4 tjrutkowski

tjrutkowski

    Advanced Member

  • Members
  • 41 posts

Posted 22 January 2011 - 01:50 AM

With 1.2.2 is seems that the pagelines_loop_metabar_end hook has been removed. Is there a new way for me to modify the byline section? Thanks!

#5 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 22 January 2011 - 02:13 PM

If you've tried it already and it isn't working, there should be a new way. I'll mark this for admin attention.

#6 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 22 January 2011 - 05:33 PM

Hey TJ, Good catch, yes we changed out the hooks for filters. Which gives you actual control of the content. so to edit: ` add_filter('pagelines_post_metabar', 'customize_metabar'); function customize_metabar($metabar){ $mymetabar = 'test'.$metabar; //$metabar is the original metabar return $mymetabar; } `

#7 tjrutkowski

tjrutkowski

    Advanced Member

  • Members
  • 41 posts

Posted 22 January 2011 - 09:46 PM

It took me a bit to convert to the hook, but I got it. Thank you and I'd love to see these types of changes in the notes or change logs...if I missed that please point me there! --TJ