For anyone with the same problem, here’s the answer. I finally figured it out.
// Display Profile Sidebar ACF
add_action('genesis_sidebar', 'employee_title');
function profile_photo() {
if ( is_singular('profile') && genesis_get_custom_field('employee_title') )
echo '<div id="employee-title"> '. genesis_get_custom_field('employee_title') .'</div>';
}
This is the the hook location in Genesis where the custom field data needs to output to: genesis_sidebar
. Using that puts it in the sidebar. I was using genesis_entry_header
which was putting it at the top of the post. I’m putting it in single-profile.php which I created as a template for the custom post type, but you could probably also add it functions.php. Just beware taht you need to replace is_singular('profile')
if you are not using a custom post type. Even if you are, replace profile
with the name of your custom post type.
As a bonus, there’s a div around it for styling.
Related Posts:
- List events by month
- Remove duplicated values from a loop
- WordPress Genesis custom taxonomy archive shows 3 repeats of each post
- Custom Post Type Loop throws 500 error when used in widget
- Problem with WordPress query on page using custom fields
- The loop seems stuck to a single (now deleted) post
- Custom post type showing same Post on all Pages
- Move Genesis Single Page/Single Post Title
- Post loop count is not in order
- Query to get child pages of current page and display it in action hook
- get custom post type value in header.php [closed]
- Can’t replace the default sidebar with a custom sidebar on Custom Post Type in Genesis
- Fetch data from two custom post types and create multidimensional array for output to html table
- Show custom post type event if current day using ACF
- Some posts not displaying by taxonomy term
- ACF meta_key and meta_value break loop
- Wrapping an unknown amount of posts inside separate HTML Containers during WP_Query loop
- Display related post content and custom field content
- $post breaking container loop
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- Custom Post Type Loop breaking php
- Styling first post using Advanced Custom Fields
- Filter page ID outside the loop and order
- WordPress post objects in one parent post object
- How do you get the count of posts in an archive page?
- importing third party json feed as custom post type [closed]
- How to show Y number of custom posts after every X normal posts?
- WP Rest API Querying Custom Posts by ACF fields
- How to set custom post type as post title to avoid ‘Auto Draft’
- Query current and future events, ordered by begin date
- Change message given when deleting post from custom post type
- Posts navigation in custom post type single.php not working
- “add_post_type_support” with Custom Post Type & ACF
- How to connect two custom post types with nested loops
- ACF Field on CPT Slug
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Meta Query Not Returning Output Despite Having Matching Values
- customise template to only show custom post type entries
- Display Custom Taxonomy Alphabetically
- Problem: wp_query outputs all images on site
- Custom Post Types strange pagination problem
- Displaying custom field according to date
- Display related custom taxonomy posts in sidebar
- Conditional for a Single Post That Belongs to a Category?
- Sort a custom post with ACF: Date Picker & Display Featured!
- Using wp_query to modify the loop in index.php for a CPT
- Custom WP_Query doesn’t display all posts
- Listing custom post types on archive page with array
- looping though custom post types and only return results in a given taxonomy
- How to conditionally add Custom Post Type to Front Page
- Postname on unique permalink structure appends “-2” for a custom post type. How can I get this to stop happening?
- Pagination not working on custom query on a page
- Custome fields not displayed
- Create short URL with auto 301 redirect
- Why is wp api returning old acf values?
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- Custom post types, disable fields
- Looping through custom taxonomy and display custom post types (Custom Post Type UI)
- Custom post class, generate unique id from 1 to x depending on amount of posts?
- Get post-meta value of all custom-posts – lowest to highest year-count?
- Adding link to dashboard sidebar, nested under custom post type
- Custom Post Type Query W/Category Dropdown
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- creating a foreign key like relationship with custom post types
- On click some element i want to use some template
- How to Enable Ascending or Descending In WordPress Default Built-in Loop
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How to display posts from a certain category in a bootstrap 5 carousel loop with multiple items?
- Query filter by value in meta_value array
- Loop all post on single.php
- Custom post ID & display information related to this ID
- Pin posts to top of custom loop
- Expire post to draft by date-picker custom field
- WP_Query not using custom taxonomy categories on custom post type
- How would i insert a value of custom field from Advaced Custom Field into shortcode generated by Gravity Forms [closed]
- Auto generate excerpt from ACF field on a CPT that does not support excerpt or content
- Custom WordPress theme not displaying posts from category
- Button link display in shortcodes using custom field in ACF
- How do I link to a dynamic ACF button from a Custom Post type?
- Combine multiple separate lists into one
- How to hide sub fields in a field group and also the entire field group if the answer selected is “no”
- custom post type single page
- How to prevent post to repeat on my loop?
- Automatically convert standard posts with custom fields to custom post types
- Custom post types not displaying per category
- Submit and edit font end custom post type
- Making my custom column sortable
- How to show Y number of custom posts after every X normal posts?
- Get month and day from a Date Picker custom field
- Load different template for CPT (in loop) in my plugin?
- How to loop custom post type posts by author?
- Modifying and Displaying URL’s in a Post Template using parse_url
- Inserting random posts
- Categories and page filtering with pre_get_posts
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- loop through custom post-type with two meta_keys
- How to exclude certain portfolios from a loop
- How to create custom page templates with default page layout framework?
- Why custom search engine only searches in post titles of custom posts?