What is the difference between actions Replace and Forced replace?

If two or more sidebars are set to replace the same target sidebar and their conditions overlap for some content, they will replace the target sidebar first and then gracefully merge with each other, so that they all are displayed with that content.

A sidebar that has action Forced replace will simply replace the target sidebar. If several sidebars have this action for the same target sidebar and their conditions overlap for some content, only the sidebar that is loaded last will be displayed.

 

Posts in Category Example

You have created 2 sidebars, one for posts in Category A and one for posts in Category B. One of your posts contains both Category A and Category B which means that the sidebars’ conditions overlap for this post.

If the sidebars use the Replace action, they will both be displayed on this post, so that their widgets are merged.

If one of the sidebars use the Forced Replace action, only that sidebar will be displayed.

And finally, if both sidebars use the Forced Replace action, only the sidebar with the highest Order will be displayed.

Was this article helpful to you?