I am trying to:
I created a custom post field called 'twitter-url' in a custom post type called 'Site Details'. I Used Elementor to edit the page I want the info displayed on and I selected 'Shortcode' from the dynamic list and entered what I think is the correct shortcode for post id 3679 but there is no link showing on the public page.
The source code shows:
Twitter
but it should show:
lien caché" class="elementor-button-link elementor-button elementor-size-sm elementor-animation-float" role="button">
<span class="elementor-button-content-wrapper">
<span class="elementor-button-text">Twitter</span>
</span>
Link to a page where the issue can be seen: lien caché in the footer on the right (the word 'twitter').
This is the shortcode I entered:
[types field=‘twitter-url’ post_id=’3679’][/types]
The types filed is a URL and I'm attaching images of the settings. Can you please tell me why I cannot get this to work.
Many thanks,
Barry.
Hi, I noticed that the quotation marks aren't quite right. Can you try this version instead?
[types field='twitter-url' post_id='3679'][/types]
Hi Christian,
Thank you for that. It's nearly working. A URL does now appear but in the page source it is the following:
href="lien caché" title="lien caché">lien caché;"
...and when hovering over the link I see this:
lien caché
So should I change the format of the custom post field from URL to single line?
Or would it be easier if I add the 'before' field in the shortcode editor to:
lien caché
and then add just the twitter name of annabellasesco2 to the actual custom post field which would then be the content of the shortcode?
Sorry if I've completely barking up the wrong tree.
Many thanks,
Barry.
I think you need the raw URL output instead of a full link tag. Try this alternate, which should produce the raw URL text without extra markup:
[types field='twitter-url' post_id='3679' output='raw'][/types]
My issue is resolved now. Thank you!