Hi everyone,
I’m trying to search a solution for the following problem:
I want to show a list of recent posts in the sidebar as widget. These posts have to be filtered by the custom fields.
For example; I have a list of radiobuttons with all countries. Now I want to show all posts in the with the “Netherlands” selected.
I see this tutorial in the documentation. I guess this is what I mean.
But how can put this as a widget in my sidebar?
I hope someone can help me with this.
Greets Mark
Hi @Markgoessens
To place this in a widget that you can use in the ‘widgets’ area of the wp-admin and drag / drop to re-position, you will need to create a new custom widget.
This is not a difficult task and you can find many tutorials on the net to help.
The beauty is that your widget does not need to save any data other than the title, so you can skip over any instructions to add in custom input fields.
Then, you can place ‘the tutorial code’ into the widgtes render function!
Good luck
Thanks
E
Hi Elliot,
Thanks a lot! This solves my question.
I never made my own widget before so that’s why I couldn’t came up with that idea.
I’m very glad that I made my first widget and solve this problem.
Greets Mark