Community Forums › Forums › Archived Forums › Design Tips and Tricks › Customizing the post meta
- This topic has 11 replies, 3 voices, and was last updated 11 years, 4 months ago by
Brad Dalton.
-
AuthorPosts
-
November 10, 2013 at 10:16 pm #72250
Callum
MemberHi,
I know there is some basic customization that can be achieved with the Simple Edits plugin, however I was wanting to add a custom line in the post meta for image attribution/credit.
Does anyone know if this is possible and how one would go about achieving it?
Thanks.
November 10, 2013 at 11:51 pm #72260nutsandbolts
MemberYou can create a meta box for image attribution on your posts, then create a shortcode to pull that info to the post meta via Simple Edits or a custom function. However, that's a fairly complicated without installing a bunch of plugins; you may need to get a developer to help.
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+November 10, 2013 at 11:51 pm #72261Brad Dalton
ParticipantNovember 11, 2013 at 1:10 am #72265Callum
MemberI was hoping to have it different for each post. Having an input area on the new post page or such. I thought it might be a bridge too far for me and it seems like it would be.
Thanks.
November 11, 2013 at 2:13 am #72267Brad Dalton
ParticipantAs Andrea stated, the best way to do this is to create a meta box which displays on all edit screens.
You can then hook in using the post info hook and a custom field.
There's a bit of work involved in this but its the best solution.
Andrea may be able to help you with that otherwise let me know.
November 11, 2013 at 2:24 am #72270Brad Dalton
ParticipantSorry i meant the Post meta hook with the ACF plugin.
add_filter( 'genesis_post_meta', 'custom_post_meta' );
November 12, 2013 at 9:18 pm #72610Callum
MemberHi Brad,
Thanks for your help. I've installed ACF and created the field etc. The issue I'm having is the process of adding to the posts. Any guidance you could provide would be greatly appreciated.
Thanks
November 12, 2013 at 9:28 pm #72614Callum
MemberI should mention I'm looking to add it in the post meta after the post, alongside "Filed Under" and "Tagged With".
November 12, 2013 at 9:29 pm #72615Brad Dalton
ParticipantHi Callum
As Andrea mentioned,
However, that’s fairly complicated without installing a bunch of plugins; you may need to get a developer to help.
I always share my code with the StudioPress community however i don't have the code you need otherwise i would give it to you.
You need to filter the genesis post meta function or hook in your custom field using that hook with a different positioning parameter.
You could also create a shortcode which is more work however you can then add it using the Genesis Simple Edits plugin.
Fair amount of coding and work i think.
November 12, 2013 at 9:55 pm #72624Callum
MemberBrad,
Thanks again for you time.
I actually just figured this out, a real EASY method to do it. I'm sure there are better/leaner methods but this works great for me.
For future reference of anyone seeking to do the same.
You need three plugins (I'm sure these could be eliminated if you knew what you were doing): Simple Edits, Advanced Custom Fields and Custom Fields Shortcodes.
1. Create the Custom Field using ACF Plugin.
2. Go to create a new post and insert the custom field shortcode using the option created by the Custom Field Shortcode plugin.
3. Paste that shortcode into the appropriate are in the Simple Edit plugin.Works exactly as I wanted.
Thanks again,
Callum
November 13, 2013 at 12:02 am #72647Brad Dalton
ParticipantGood solution Callum. Didn't know about Custom Fields Shortcodes addon.
November 13, 2013 at 12:12 am #72650Brad Dalton
ParticipantI did get these errors when installing the plugin:
Warning: Invalid argument supplied for foreach() in C:\Users\brad\Desktop\InstantWP_4.3\iwpserver\htdocs\wordpress\wp-content\plugins\custom-fields-shortcodes\custom-fields-shortcodes.php on line 251
Warning: Cannot modify header information - headers already sent by (output started at C:\Users\brad\Desktop\InstantWP_4.3\iwpserver\htdocs\wordpress\wp-content\plugins\custom-fields-shortcodes\custom-fields-shortcodes.php:251) in C:\Users\brad\Desktop\InstantWP_4.3\iwpserver\htdocs\wordpress\wp-includes\pluggable.php on line 899
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.