Your meta option is post_options_select
. You are using wrong meta key options-select
in function display_content
.
But main point is that, you cannot control the sidebar layout from the_content
filter. If selected option is ‘No Sidebar’ then you need to hide sidebar in your template. the_content
only contains the content of the post. How it should be displayed whether with sidebar or not, it should be controlled while including sidebar.