-
connect4consulting
I am trying to set up a slider carousel to be used as a local pattern and then located in several places on the website. I want the individual slides to pull dynamic content from ACF fields on each employee’s page. I am using swiper.js, ACF, and generateblocks pro, but keep running into problems when trying to add the dynamic fields to the individual slides.
I’m sure the problem is some configuration issue with ACF, but I am having lots of trouble figuring it out.
Details in private info.
Thanks!
-
Hi there,
What is the issue? The dynamic tag doesn’t output.
Can you describe the issue in more detail? How you set up the employee pages, are they custom post types? What dynamic tag are you using? What ACF fields did you created for them?
Let me know, thanks!
-
connect4consulting
I have set up the Employee pages and made their parent the Our Team page.
In ACF, I have created a field group called “Employee Details”. There are three fields: Name, Credentials, and Title.
In ACF Settings / Location Rules, I have it set to “Show this field group if Page Parent is equal to Our Team”.
In the Courtney Jones Employee page, the ACF fields appear and I have added her Name, Credentials, and Title.
I have added the following CSS to Additional CSS:
.swiper {
width: 100%;
overflow: hidden;
}
.swiper-wrapper {
display: flex;
}
.swiper-slide {
flex-shrink: 0;
width: 350px;
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}In GB Pro, I created a local pattern titled Image Carousel.
When I created the pattern with container blocks, it mostly worked correctly. What I want to do now is update the local pattern so that it automatically pulls the Employee Name, Title, Credentials, and Featured Image from each employee page and updates the slides in the carousel.
Login details are in private info.
-
Thanks for the login, I see that you’ve created a custom ost type called Employees, but no posts have been published. Am I missing anything?
https://app.screencast.com/o2bhqee4bR27hLet me know 🙂
-
connect4consulting
Well I guess I also did that as well. What am I missing to make this all work?
I want to create unique wordpress pages for each employee and add their ACF info on those pages. When I do that, I want the slider to automatically add/update the people.
-
Yes, so it’s better to use the custom post type, and use a query block to pull them.
-
connect4consulting
If I do that, and I want a unique page for each employee like what I have in private info, how do I do that?
-
You can create a block element – content template, assign it to the single Employee post type.
Or simply copy your current content and paste it to the Employee post type.
-
connect4consulting
How do I simply copy the current content and paste it to the Employee post type? I don’t see any place to do that.
-
Click the 3 dots icon at the top right corner of the page editor, click Copy all blocks, then go to the employee page editor, click the 3 dots icon, click Code editor, paste the code, click Exit code editor.
- You must be logged in to reply to this topic.