admin管理员组

文章数量:1122832

I have created a post where I list items in my product catalogue and add links to said products.

Currently, I manually add links to the products once I have typed them out.

However, I want to know if there is a way to search for and create a link on the fly to a product in my catalogue (where the product exists).

Much in the same way that referring to a user by typing @ brings up a list which filters as you type, I imagine that a (different) trigger character (such as a colon :) might be used in this case.

For example, whilst listing products, I might want to link to Product 1234, so I might type :product_12 and it suggests the closest matches as I type.

Is this possible? Is it a feature that I can build myself?

(Note: I am new to WordPress (and to this SE site too) so have added the tags I think might be relevant but please change accordingly if not.)

Thank you.

I have created a post where I list items in my product catalogue and add links to said products.

Currently, I manually add links to the products once I have typed them out.

However, I want to know if there is a way to search for and create a link on the fly to a product in my catalogue (where the product exists).

Much in the same way that referring to a user by typing @ brings up a list which filters as you type, I imagine that a (different) trigger character (such as a colon :) might be used in this case.

For example, whilst listing products, I might want to link to Product 1234, so I might type :product_12 and it suggests the closest matches as I type.

Is this possible? Is it a feature that I can build myself?

(Note: I am new to WordPress (and to this SE site too) so have added the tags I think might be relevant but please change accordingly if not.)

Thank you.

Share Improve this question asked May 22, 2024 at 11:20 MusMus 1195 bronze badges 6
  • 1 If you type [[ in the editor then you get latest posts link inserter, but it seems to be only for post and page types. – birgire Commented May 22, 2024 at 13:09
  • 1 What about ctrl+k in the editor to activate the link search? – birgire Commented May 22, 2024 at 13:19
  • 1 @birgire Would you believe it - both solutions work! Now I face the dilemma of which to use as the decision process will no doubt cripple me but that's no longer your problem. Thank you! Please combine both suggestions into a single answer so that I can accept. Thanks again! – Mus Commented May 22, 2024 at 16:30
  • 1 Mus, great to hear that, I posted it as an answer. – birgire Commented May 22, 2024 at 18:42
  • 1 Thanks for update, I did update it

    本文标签: permalinksIs there a way to autolink to products when writing a post