Posted: February 2, 2020 at 1:45 pm
Have followed the instructions from https://eventespresso.com/wiki/add-sponsors-section-events-using-advanced-custom-fields/ to add a sponsors section. The section shows up on the back end, but sponsors never show up on the front end. The location settings on CFP does not include espresso_events, which I suspect is the problem. EE 4.10.3 A post from 2016 https://eventespresso.com/topic/acf-cannot-select-event-post-type/ |
|
Hi Maureen, I suspect it’s a different problem. You do see the section on the event edit page, correct? The sponsors not showing on the front end would be an indication there’s a problem with the code you added. May I ask did you add the code to your theme’s functions.php file or was it added to its own plugin? |
|
That glimmer of hope makes me very happy! The code was added to a plugin. |
|
Yes, the section appears on the back end. I can add content, but nothing shows up on the event page. |
|
|
|
The code you have differs quite a bit from the tutorial. You’ll note that the tutorial doesn’t make use of ACF’s I can help you with troubleshooting the EE side of this. You could try adding this temporary debug code to see if the EE provide hook is firing:
Then double check to make sure the plugin is activated. After that you should see the example output on the site event page |
|
I had a developer helping with the setup, and the idea was to have the ability for multiple sponsors per event, hence the repeater code. The developer is gone, and here I am, learning as I go. I started over using your tutorials and have the sponsor area showing up. However, the logo is showing up as a broken link. |
|
Hi, It looks like you need to change this:
You’ll find more information here: https://www.advancedcustomfields.com/resources/image/ |
|
I’m using the code straight out of the sample, so I don’t have <div class=”the-sponsor-image”>“>“></div> in the code to replace. |
|
The code from the sample has this:
The code you shared in your earlier reply has this:
Maybe you’ve change the code since then. In any case, to show an image using a custom field image url, you’ll use the html like this:
If the above doesn’t show an image, you could double check your field slug to make sure it matches the field in the code. |
|
I have scrapped my original code (for now) and am using the EE sample code, straight up. function ee_event_sponsor_area() { <h4>“>“><?php the_field( “sponsor_company” )?></h4> The sponsor section show up, but the image is a broken link. I can put an image in the bio wysiwyg field, but the sponsor_logo_image is a broken link. |
|
Hi, I’m afraid I do not see an image tag (or In the future please consider putting the code into a bin at wpbin.io then share a link here. If you want to add an image, the following code can be added to your function:
|
|
The support post ‘ACF — espresso_events not a post type’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.