Community Forums › Forums › Archived Forums › General Discussion › Genesis Simple Hooks needs after-entry-meta hook
Tagged: ACF, entry-meta, Genesis Simple Hooks
- This topic has 6 replies, 5 voices, and was last updated 9 years, 1 month ago by carasmo.
-
AuthorPosts
-
November 4, 2013 at 9:27 pm #71002Marc TibesarMember
I would like some Advanced Custom Fields fields to display immediately after the entry-meta in each Post.
However there is no hook for this area of the Post (within Genesis Simple Hooks).
Is this something that could be added to the plugin or, is there another way to place these custom fields?
http://tibesar.com/blog
November 4, 2013 at 9:36 pm #71003Brad DaltonParticipantAdd the 3rd parameter for positioning priority and hook it in from your functions file http://wpsites.net/web-design/3rd-parameter-action-hooks/
April 2, 2015 at 3:25 pm #146499mikelbylMemberI am trying to grapple with the exact same issue - I want to use GSH to display some php code (which picks up info from ACF) AFTER the entry-meta.
When I place the code in the genesis_entry_header hook location, it displays my code and THEN the meta info - I would like it to display in the opposite order.
Funnily enough, when I place the code in genesis_entry_content, it displays AFTER all of the content - behaviour I would love if it were consistent in the genesis_entry_header context.
Brad Dalton's advice is useless to me as I will not register elsewhere to get the answer to this. Such practices should be banned in a software support forum. All answers should be fully visible in this location.
December 2, 2015 at 10:33 am #172480StacyNParticipantI agree - we are hoping to have people who enjoy participating within StudioPress (which we have already paid for) hopefully share and provide some solutions between ourselves. Linking to an answer that is hidden - that must be paid for to see - isn't helpful in the least, but very much self-promotion.
December 2, 2015 at 11:26 am #172483carasmoParticipantI don't agree. This is the community forum so there's no guarantee of an answer and it's not part of the purchase price. When the answer and thousands of other useful ones are just $47.00 for an entire month of reading and learning, it's worth thousands of dollars in time saved and knowledge gained. Doing things that are outside of the scope of the theme's official support oftentimes requires more than reliance on plugins. I normally have the WP codex site open because with any framework (front or back), I need to learn the supporting code base and the technology used to deliver it to the page (CSS, php, html, js). You can also sign up for TeamTreehouse, which is not entirely Genesis specific, but you won't get the specificity that Brad offers.
In any case, I'm not a member of Brad's site, so for this situation only, here's the answer. I typically don't answer these kind of questions since the answer, though not readily apparent, is in the StudioPress documentation in the hooks section.
// add something immediately after the the meta on singular posts add_action( 'genesis_entry_header', 'rename_this_function', 12 ); // 12 is the remove priority, since this file comes after the Genesis parent, then using 12 is fine. function rename_this_function() { // if is a single post (not a page) if ( is_singular('post') ) { //put your code here. } //end if singular } //end 'rename_this_function'
December 2, 2015 at 2:35 pm #172510StacyNParticipantI realize the knowledge is very valuable and there's no argument one should be compensated for that skill. For example, I work as a photographer. If I were participating in a photography forum with my peers - I personally wouldn't be comfortable sending someone to a sentence or two of an answer to get someone interested... and then link them to a "want more - sign up" site? To each his own 🙂 I can appreciate that some coders probably don't mind a bit paying for a solution in a quick manner to expedite the job.
I certainly wasn't trying to be argumentative in any manner and apologize if I offended anyone.
I think the folks above time looking for the answers at length to this one - as I have been. What is interesting is the Genesis Simple Hooks plugin - there's not a place created in within it for "genesis_before_content" (or basically to have something appear following the Entry Meta info). This hook executes immediately before the content column (outside the #content div). after the Entry Meta location.
Those of us who try to use a plugin such as Simple Hooks - do so because we aren't expert programmers - but are doing our very best to dig for solutions. Some of my clients are on such a tight budget we don't have much wiggle room, so I do try to research the answers myself. I've been all through the Hooks documentation and while I know what hook is needed, no idea how to execute the hook reference.
December 2, 2015 at 4:11 pm #172516carasmoParticipantThe Simple Hooks support forum is here: https://wordpress.org/support/plugin/genesis-simple-hooks
The "genesis_before_content" is exactly as you described. However it's not the hook you need, which is in the category of a loop action hook http://my.studiopress.com/docs/hook-reference/#loop-action-hooks. In Simple Hooks, there is limited support for loop-action-hooks and there is no support for priority (reference). Simple Hooks is simple in this regard but it's an amazing tool for non-coders for many things.
Research is often longer than getting paid help (especially when you get an entire 30 days) when you're not even sure what it's called. I spent hours and hours looking to add custom fields in WordPress to add my own interface in the backend settings for phone(s), email address, social networs, logo, address, additional styles, basically all the standard repeatable and global content on one page, and the only results I got was either the ones (key) you would add as a user (options panel) or ACF, then I cracked open the WordPress Codex and learned that they are called meta boxes and then I searched and found what I was looking for. If I wasn't so sleepy, I would have just used developer tools on any admin screen and seen the class .metabox-holder and saved a lot of time.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.