Skip Navigation

[Resolved] Are custom fields uniquely related to post types?

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 10 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by vytenisK 10 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#118435

I've created an image field and I've set its post type to 'pages'. What I am trying to do is have a clickable image (uploaded in the custom image field) link to that respective page. Is that possible?

#118924

Hi vytenisK,

It is possible, I assume you have installed Views,
https://toolset.com/home/views-create-elegant-displays-for-your-content/
and your custom image field is slug "my-upload-image"

you can create such a image link like this:

<a href="[wpv-post-url]"><img src="[types field="my-upload-image" size="thumbnail" url="true"]" /></a>

https://toolset.com/documentation/functions/#Image
Parameters: ‘url’ => ‘true’|'false’ – When true it will output the url of the image instead of the img tag. Works with the size parameter to output the url of the re-sized image

[wpv-post-url] is a shortcode of Views:
https://toolset.com/documentation/views-shortcodes/#wpv-post-url

#119205

Thanks, I'm trying to do it through vanilla WP, but I'll keep this in mind.

#119369

If you do not have a copy of Views, you need do it with PHP code, for example:
Display the url to the current post:
<?php $permalink = get_permalink( $id ); ?>
http://codex.wordpress.org/Function_Reference/get_permalink

#119564

Thanks.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.