I have a wordpress site with 100+ pages. Now suppose 5 pages are related to page 1, and I want to show them in side bar as similar pages/related pages and other group of pages in other menu in sidebar. There is no child-parent relationship between these pages all are in root including homepage.
Same goes for other pages also, they all have to show different pages as related and other pages in sidebar.
So every page has different links under sidebar grouped in two different menu, one related pages other other pages.
The possible solution i found is using these plugins;
-
Dynamic Widgets , in this case i create lot of custom menu and show them on pages in custom menu widget and control by this plugin. Very tedious job, I have to create more than 20 custom menu.
-
Flexi Pages Widget , In this case i create several page widgets(more than 20) and control with Dynamic Widgets to show them on different pages.
Now both solution i find not look good to me, any suggestions on this?
One more solution come to my mind is go in PHP/code and create different sidebars, but not look feasible to me.
You valuable reply in this regard is highly appreciated. Thanks in Advance!
Update: Using advance custom fields plugin, with relationship fields.
I think you may be making this more complicated than it needs to be.
use the built in “Custom Fields” meta box or build your own meta box
for this “association” field. Populating your sidebar is then a
matter of a
meta_query
.matter of a
tax_query
.Whichever you use, you would only need one sidebar widget to pull the related posts.