Skip Navigation

[Resolved] Problem with custom Term Fields on Front-End in Block Editor (WordPress Archive)

This support ticket is created 4 years 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
- 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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Rostislav Avtodiychuk 4 years ago.

Assisted by: Waqar.

Author
Posts
#1863095
Scr4.png
Scr2.png
Scr3.png
Scr1.png

Tell us what you are trying to do? I need to add information to the category archive of goods that is individual for my category. I have created several custom fields in term fields. scr1
One of the fields is the color of the category and a link to another page.

I did not find dynamic fields for term fields in the block editor. But I found this article https://toolset.com/documentation/user-guides/views/displaying-wordpress-term-fields/ , and the initial result suits me, the button field - correctly displays information, but the link field seems to be dynamic and not work.

[types termmeta="line-link"][/types]

How can this be fixed?

Also, is it possible to use custom field color picker with block editor.

Thank you for help.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site? hidden link

#1863489

Hi,

Thank you for contacting us and I'd be happy to assist.

I've performed some tests on my website, but couldn't reproduce this issue.

Can you please share temporary admin login details, so that I can see how this WordPress Archive is set up?

Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1864603

Hi,

Thank you for sharing the admin access.

During troubleshooting, I noticed that the Type's term field shortcode works in the link field of the button block if it is used inside the loop of the WordPress Archive, but not when it is outside the loop ( as it is in your archive).

I'll share these findings with the concerned team for further review and appreciate you brought this forward.

For now, to make this work outside the loop, you can register a new custom shortcode that extracts the value from the Type's term field shortcode and then returns it.

Example:


add_shortcode('output_term_line_link', 'output_term_line_link_fn');
function output_term_line_link_fn() {
	
	$content = do_shortcode('[types termmeta="line-link" output="raw"][/types]');

	return $content;
}

The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through active theme's "functions.php" file.

After that, you can replace the shortcode [types termmeta="line-link" output="raw"][/types] from the button's link field, with this newly registered shortcode:


[output_term_line_link]

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1864685

My issue is resolved now. Thank you Waqar! It's help me.
Love work with Toolset.