2

I can add an rss widget with this command:

wp widget add rss my-sidebar --title=News --items=5

But when I add a URL parameter, like this:

wp widget add rss my-sidebar --title=News --items=5 --url='https://news.example.com/feed/'

Or like this:

wp widget add rss my-sidebar --title=News --items=5 --url=https://news.example.com/feed/

Or like this:

wp widget add rss my-sidebar --title=News --items=5 --url="https://news.example.com/feed/"

Or any other configuration, it complains Error: Invalid sidebar.. When I add the sidebar and then try to update the URL parameter, with:

wp widget update rss-6 --url='https://news.example.com/feed/'

Or even:

wp widget update rss-6 --url=https:\/\/news\.example\.com\/feed\/    

It says Error: Specified widget isn't present on sidebar. How can I get it to properly add an RSS widget? I feel like there's something I'm not properly escaping.

1
  • This is a clash with the global --url parameter and not availabe to sub-commands, as mentioned in this open ticket
    – birgire
    Jul 17, 2015 at 17:37

0

Your Answer

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

Browse other questions tagged or ask your own question.