Display ACF Link Titles

Hi,
I’m trying to use ACF to display custom content on a page.

I have tried using the URL field, Link (Link Array) field, and Link (Link URL).

The Link > Link Array displays the correct content, but it displays it all as text.

I want the Link Title to display as the link and the URL to open a new page with that URL. I originally was writing it all as a button and it worked great, but it always showed on the page. My goal is to hide the content if there is nothing in the ACF field.

Thank you!

Hello @jmccarley,

Thanks for writing in!

To properly use ACF plugin in the theme, kindly check out this documentation first:

And if you are using the editor, you may need to use the Dynamic Content functionality. This documentation should be able to guide you how you can use ACF and Dynamic Contents:

Please let us know if this works out for you.

Yes, I was already doing that.

I’ve never used Toolset, so I’m going to give that a try.

Great! Please let us know how it goes.

Hi @ruenel,
So I started using Toolset! It has solved SOOOOO many items on my list! I cannot thank you enough for recommending it! It solved things I’ve been looking for a solution for WEEKS! So thank you, thank you!!

After hours of trying to figure it out, I finally figured out how to add a custom post type that works!! WAHOO

However, I cannot remove the .p-meta from the custom post type. Or at least not through Global CSS. I am using the single.company.php template in my child theme.

I have tried every variation of .single, .single-company, .single .company, .single_company, .company

/* remove the meta data */
.single .company .p-meta {
    display: none;
}

IS there a better way?
Thanks!

Hi @jmccarley,

You can turn off the Post Meta via Theme Options > Blog > Content > Post Meta (see screenshot)

image

This would turn the Post Meta off globally however if you want to disable it from custom post type only then you’d need custom CSS for that, While that is outside the scope of support, I could point you in the right direction with the understanding that it would ultimately be your responsibility to take it from here.

You can inspect your single custom post using chrome’s developer tools, you’ll find the correct classes in the <body> tag (see screenshot)

Now you can use the classes in this way .single.single-format-standard. To learn using Chrome DevTools, please see https://developers.google.com/web/tools/chrome-devtools

Hope this helps!

ARGH!! I knew I was doing it right!! I finally took a closer look at the CSS above what I had in and there was an open tag, so it was all connecting. :man_facepalming:

@jmccarley,

We are glad that my colleagues were able to help you with your problems.

Thank you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.