I am trying to add a search results web part to a publishing layout page. This is a publishing page layout based on the built in article content type. This is in a SharePoint Online environment.
I have followed these 2 articles
At this point, I have a search results web part configured on my publishing layout page. I have my own guid in the __WebPartId attribute and I have a register statement for the Microsoft.Office.Server.Search.WebControls. However, when I render a page based on this publishing layout page, I see nothing for search results.
I need this on the publishing layout page because we are planning to create many articles based on this layout. The search results web part is going to search against a result source based on the value in a field on the page. Thus, the search results will act as a related articles section on the page. If I decide to add the search results web part to the page instead of the publishing layout page, it works. However, this is not an option as we will have many pages.
Any ideas? Should this work or is it not possible?