Skip Navigation

[Resolved] How to insert a button with external link (custom search results)

This support ticket is created 5 years, 2 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 1 reply, has 2 voices.

Last updated by Beda 5 years, 2 months ago.

Assisted by: Beda.

Author
Posts
#1194574
image 1.png
image 2.png

Dear support, hope you're doing well.

I have a few questions:

1. I read your documentation but didn't find anything related to what I need. I'm building a custom search and would like to add a button with an external link inside each post that I created (which are shown on the results). I saw something similar on one of your demo sites but in this case it is a skype button (I need more like a button linking to another website or to a Facebook profile). Please see the attached image 1. Also, here's the link for that:

hidden link

2. I created a post type and inside that, I created a few posts (which will be displayed in my custom search results. I noticed that the structure where I create the posts is very similar to the default posts creator of wordpress, however I can't find the theme's settings for those posts so that I would be able to setup breadcrumbs, for example (I want to hide that) - as the image attached (2) - Also, here's the link for my custom search and results.

hidden link
hidden link

3. Another thing is that, when I open the page where the custom search is, even without typing or choosing any of the options, all the results are already displayed there. I would like to hide the results and make it appear only I type or choose an option from the drop down list.

Sorry for all the questions, I normally try to find some info on the documentation before submitting a ticket.

By the way, I would like to thank Waqar, which helped me to build a custom search, he was very patient.

Best,

Sintia

#1194671

#1
You can, for example, use some Bootstrap HTML to create a Button in your Content Template applied to single posts, and then populate the HREF of that button with the value of a custom field (let's say an URL field that you output "raw" into your HTML).

This can be populated with any link when creating the post (for example a Facebook link).

Elementor has some nice GUI that lets you create buttons pretty fast and populate those with dynamic fields that come from Toolset. If you have Elementor, I'd use that solution, otherwise, you would have to craft manual HTML in a Content Template, example here:
hidden link

#2
Custom Post Types are basically what Posts and Page are already, however, WordPress "nativized" those, but pages and posts are "just" post types, hence, custom post types are the same

You have more control over Custom post types (using Toolset) as we allow customization at a larger scale than WordPress does on it's posts and pages.

However, the popularity of Posts and Pages made many themes and plugins consider only those 2 content Types (pages and posts) and no other Custom Post Type.
That's why most of those settings in most plugins or themes won't work on Custom Post Types, and only a few themes or plugins offer solutions for that by allowing to use their Options also on other content types.

Toolset managed to make some Themes CPT ready:
https://toolset.com/documentation/recommended-themes/
Those themes have options and those work on CPT's (Custom post types).

To add your theme's options to Custom Post Types, the Theme would have to offer this, or, integrate with Post Types (thru this programme we offer: https://toolset.com/documentation/beyond-pages-program/)
That allows the theme to practically offer options in a specific format of code that can be read by Toolset.

Your theme currently displays the custom posts in its native single post template.
There, it also loads its pre and after content, so for example breadcrumbs.
I don't think there is any other way but creating a child theme, to remove those, unless the theme offers options to control that, then they should apply globally.
You can style the post with a Content Template, but breadcrumbs are not part of the_content and hence, you could not control them with Toolset (Unless options are offered by the theme).

#3
That is expected.
The solution would be to move the results to another page, which is explained here:
https://toolset.com/documentation/user-guides/front-page-filters/#4-1-adding-the-custom-search-form-to-a-page-or-widget

Please open up new tickets for every single question if some doubts are left, we are happy to answer every doubt present however we are asked to handle just one each ticket 😉
https://toolset.com/toolset-support-policy/

Thanks!

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