What about using a custom field on each post/page and entering the sidebar links as HTML code in the custom field?
Then set the sidebar up to see if that custom field exists in the current page / post. If it does, display it in a designated area in the sidebar.
If you don’t want to deal with writing HTML then create the links in the visual editor in a section at the bottom, using the link button to use a form and do it visually. When they are all in place switch to the HTML tan, highlight and cut the HTML code out of the post and paste it into the Custom Field.
Thread Starter
squidz
(@squidz)
stvwlf –
Have been considering custom fields. While the options you mention are legit, neither is user-friendly for the client who’ll manage the site. They need to be able to simply paste/type a url and “attach” links to a page/post. Typing HTML is not an advancement for their site’s manage features.
I really can’t believe there isn’t already a widget to add links to specific pages/posts. Seems like it would be a common need. Like a link “gallery” for a page/post.
Clearly one can add links right in content. But the objective here is for them to appear in the sidebar.
Seems we could set up 5-10 custom fields, each being a link input. Paste/type url, done. The catch is you have a limited number.
You didn’t mention it was a client site…
Another way to do it is use the WP links system, which IS user friendly, to enter links. Have the client create one links category per page/post. Enter the links and assign them to that link category. Then you need only one custom field per post/page which contains the link category’s slug.
Set the sidebar to pull the link category slug from the post/page’s custom field and display links in that link category in the sidebar.
Yes, it would be nice if it was all on the same page. But you can train the client to work with more than one dashboard browser tab open to easily switch between editing posts/pages and entering links.
Thread Starter
squidz
(@squidz)
That is a reasonably user-friendly method and one we’ve also considered and it would work. My problem with it is that their 9 year old CMS has had this simple feature from the beginning. Anything less, is a step backward for feature they’ve leveraged fairly heavily.
This is like the WP missing widget.
Actually I think the missing WordPress plugin is the one that lets you set an expiration date on posts, after which they move from category A to category B.
In terms of what you are looking for, using a preexisting plugin, look at
http://wordpress.org/extend/plugins/custom-field-template/
which creates data entry-like forms for custom fields.
I would put all the links in one custom field.
With this plugin you can create a text box that has the TinyMCE editor loaded in it. That means customer can create links exactly the way they do in the WP editor.
I would train them to put one link per line. They type in the text that will be clickable, highlight it, click the link button and paste in the URL – instant link.
Then they go to the next line and enter the next link.
When the post is saved its all stored in one custom field. You can have 132 links on the one post if you want.
Then you split the custom field into an array before displaying in the sidebar, one link per array element.
No need for categories with this method, its all associated with the post/page and saved automatically. Yes, the customer has to pay attention to what they are entering in the box.
I don’t have any suggestions beyond this one other than if this is not good enough you may need to have someone create a custom plugin.
Thread Starter
squidz
(@squidz)
stvwlf – now that sounds like a viable solution. I’ll check out the plugin you referenced. I have dropped the idea of creating our own plugin to my dev partner. Right now, there’s timing to deal with.
I agree with you on the expiration of posts. I do believe I’ve seen a plugin that can handle something like that. Will let you know if I come across it again.