Hi,
I am displaying a widget via the functions.php in my child-theme. The code is
add_action('ava_after_main_title','avia_header_top_column');
function avia_header_top_column(){
ob_start();
dynamic_sidebar( 'teaser' );
$footertop = ob_get_clean();
$output = "<div class='container_wrap' id='kopf'>";
$output .= "<div class='container'>";
$output .= $footertop;
$output .= "</div>";
$output .= "</div>";
echo $output;
}
I want to show this widget on all pages except a certain page. How could this be done?
Thanks in advance!
Hey bnetz,
Thank you for the inquiry.
You would have to include a conditional function in the snippet such as the is_page function. Please check the documentation for more info.
// https://developer.wordpress.org/reference/functions/is_page/
At the very top, you might have to do something like this.
if(is_page(array(1, 232, 424))) return;
This cancels out the function or immediately returns nothing when the current page has the ID of 1, 233 or 424.
Best regards,
Ismael
Thanks, Ismael, this completely solves my problem!!!
/closed
Hi,
If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon