Can Sidebar’s widget retrieve information from content area?

We have a map in content area which shows number of entities in each
district. Then we have search form widget in sidebar area. We wanted
these two to cooperate. If I change something in search form and press
Search -> the map would dynamically respond and vice versa. Vice versa
= if i pick the district, this district would be changed in sidebar’s form element. We were told this isn’t possible as of now.

While I consider this poor design ( why have 2 district options? Two ways of browsing the same map in unrelated sections of the page?), your problem here is the districts, how does the search widget know what districts were in the posts content?

on other subpage we have in main content area results of search
(companies, addresses, etc.) In sidebar, we planned to have a minimap
showing location of these search results. Coder claims that sidebar’s
content aka widget of minimap has no way to find out what the results
and addresses are.

The same problem again.

So this is how you would do it, and why it’s not reliable.

Firstly, those posts/post content was pulled in via the main query.

So what the minimap would do here is look up the main query using the PHP globals $wp_query, grab the post from its member variables ( it’s a WP_Query object), and look up the map data. This is not a beginner level task and is beyond the most WordPress coders ability/knowledge.

This will not work if:

  • any calls to query_posts were made, as the main query has been swapped out, you will get different data
  • Multiple posts were found rather than 1, leading to a new problem ‘which post?’
  • No posts were found
  • The page does not have a post ( e.g. buddypress views )
  • Any of the widgets that preceded the search/map widget cleared up the post globals

My opinion on the whole matter is that your coder honestly does not know this, or if they know about it, they know how fiddly and unreliable it can be. I also think that what you’re describing is sub-optimal, and if you were my client, I would counsel against implementing this purely from a user interaction point of view, and would suggest looking for better ways of doing it.

The idea of having multiple methods of selecting a district all on screen at once is confusing, and what you ask for is fiddly to implement and would be fiddly to use

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)