0

I'd like to insert a link in a widget to a blog entry or page. The link's text should be the entry's/page's title.

As stated here, it's currently not possible to use the navigation block in a widget as it has been disabled.

Is there any way to enable the block again (any hack is ok) or is there some workaround to simply insert a link in a widget which points to an entry/page?

5
  • 1
    have you looked into using a shortcode? The response to the comment on github you linked to indicates that if you enabled that block on the widgets screen it would never save its content and be useless, not until certain foundational work is done on the widgets screen and migrated from the site editor, which is a much larger piece of work than a stack exchange question could handle
    – Tom J Nowell
    Commented Jul 8, 2023 at 1:34
  • @TomJNowell Ok I missed this. So it's definitely not possible using navigation at current time. So is there any other way? You where mentioning shortcode? But how to use a shortcode to point to any page the editor wants to?
    – Abid
    Commented Jul 8, 2023 at 11:51
  • you'd find a plugin or shortcode that does that, I'd focus less on the "point to any page" part as that's an ultra specific way to describe what you want that eliminates lots of options, you can summarise it as "How do I display a link to a page that uses that pages title as the link text?" Which makes the problem much easier to solve. As for how you'd build such a shortcode, the task is generic enough that there are probably hundreds of ways to do it if you're willing to write code.
    – Tom J Nowell
    Commented Jul 8, 2023 at 12:06
  • if you're asking this as a non-developer though, then the answer is straight forward, you can't. The closest you could get is a reusable block with a nav menu inside it. Keep in mind this stack is intended for developers though
    – Tom J Nowell
    Commented Jul 8, 2023 at 12:07
  • @TomJNowell First of all thanks for answering. I am a developer. Any solution with coding needed is fine. But a the end it should be user friendly. Therefore I'm looking for something similar to navigation block which provides an easy to use search bar.
    – Abid
    Commented Jul 9, 2023 at 9:30

1 Answer 1

0

As pointed out in the comments it's currently not possible to use the navigation block in a widget. I missed the section in the GitHub issue where they explain more detailed that simply enabling the block wouldn't solve the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.