Skip Navigation

[Resolved] Id in href

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user would like to build a link to the author's page where he used the author's ID instead of the author's slug. The following shortcode was not working for the user as expected:

<a href="https://homemploy.com/community-profile/[wpv-post-author  format="meta"" meta="ID"]">See Community Profile</a>

Solution:
It turns out that the user was pasting this code in the visual mode of the Fields&Text block. The visual code will convert some special characters to their HTML code. And that was happening with the double-quotes. Which breaks the shortcode.

After pasting the shortcode in the text mode of the Fields&Text block, the shortcode worked as expected.

This support ticket is created 3 years, 7 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
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: Africa/Casablanca (GMT+01:00)

This topic contains 5 replies, has 3 voices.

Last updated by nestorC-2 3 years, 7 months ago.

Assisted by: Jamal.

Author
Posts
#2013991

Hello

I'm using this HTML code hidden link inside a "Field and Text" box to put the user ID after the website but it gets the name instead hidden link

<p style="text-align: center;">hidden link format="meta" meta="ID"]">See Profile</p>

Could you help?

Thanks

#2014573

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

What if you try to use the following shortcode:

[wpv-post-author format="meta" meta="id"]

Does that helps?

#2015747

Hello,

That's the issue, I already used this shortcode but it does not show the id, and shows the name instead

Thanks

#2015949

Hello! Minesh won't be available for a couple of days. If you don't mind, I'll continue with you on this ticket.

I believe that the issue comes from the conversion of the double-quotes into their corresponding HTML code """. Check this screenshot hidden link
I think this happens because you paste the code inside the visual section of the "Fields&Text" block. Write the link and shortcode again inside the HTML section and it will work.

If you still find trouble with it, please allow me temporary access to your website and let me check this closer. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Please provide the URL, in the backend, of the page or content template that you are testing with.

#2016845

I think that you were working on the content template for the Companies CPT, right?

I edited the Fields&Text block and used single quotes instead of the double-quotes HTML codes, because the href is already wrapped inside double quotes:

<a href="<em><u>hidden link</u></em>  format='meta' meta='ID']">See Community Profile</a>

And it seems to give the expected result hidden link
Please check from your side and confirm it is working as expected, or let me know what URL/ID should be generated for a test post in the Company CPT.

#2016881

My issue is resolved now. Thank you!