Jump to content
Sign in to follow this  
tjrutkowski

Add Custom Fields to Bylines

Recommended Posts

tjrutkowski+    3
tjrutkowski

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

Share this post


Link to post
Share on other sites
Andrew    201
Andrew

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 <?php } `

Share this post


Link to post
Share on other sites
tjrutkowski+    3
tjrutkowski

That's it, thank you very much!

Share this post


Link to post
Share on other sites
tjrutkowski+    3
tjrutkowski

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!

Share this post


Link to post
Share on other sites
catrina    103
catrina

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


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
Andrew    201
Andrew

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; } `

Share this post


Link to post
Share on other sites
tjrutkowski+    3
tjrutkowski

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×