Skip Navigation

[Resolved] Pagebuilder output different from actual when trying inserting custom types

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 6 replies, has 2 voices.

Last updated by Charles 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#594221

Support,

I am using the following code to display a button with custom fields:

<div class="articlebnbuttonwrapper"><a class="articlebnbutton" href="[types field="amazon-url"][/types]">PURCHASE:&nbsp; [types field="price"][/types]</a>
</div>

My pagebuilder shows the button built correctly: hidden link
But the actual output is different, not sure why: hidden link

Can you spot the problem?

Thanks,
Chuck

#594277

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chuck

You are using the same double-quote marks for your href attribute as for your field attribute. Change one or the other to single quotes, like so:

href="[types field='amazon-url'][/types]"

It doesn't matter which.

#594289

Modified to this:

<div class="articlebnbuttonwrapper">
<a class="articlebnbutton" href="[types field='amazon-url'][/types]">PURCHASE:&nbsp; [types field='price'][/types]</a>
</div>

Still looks the same?

Thanks,
Chuck

#594306

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chuck

Can you remind me which page builder you are using, and where you are adding the button?

You are designing a content template with the page builder and inserting the button with a normal text module?

#594309

Nigel,

I'm using X Theme and Cornerstone. The button is displayed within each post. I've since decided to place the html in a content template and add the template as raw data, but it's still not showing correctly, even with the changes you suggested.

Thanks,
Chuck

#594317

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Chuck

OK, I just tested this myself locally to see what's missing, and what's missing is specifying raw output for your URL field.

The Types URL field will output a link tag by default, not just the URL saved in the database. You can tell it to output just the saved URL by adding the output attribute like so:

[types field='amazon-url' output='raw'][/types]

That should do it.

#594388

Nigel,

That did the trick! I'll have to remember the importance of raw content in the future.

Thank you,
Chuck