Thanks for the feedback! Currently it’s designed to be present on every page. You could try to reverse engineer it if your comfortable with PHP and rework it to only display on 1 page.
Cheers.
Thread Starter
floxt
(@floxt)
hey again, if people land here:
You can add a condition to this function in the slidebar.php (around line 240) of the main folder (the plug-in folder, you can access it throught FTP):
function output_slidebar(){
if( apply_filters('ns_slidebar_do_output',true) && (is_page('projects') || is_post_type('jetpack-portfolio'))){
include( apply_filters('ns_slidebar_template', plugin_dir_path(__FILE__).'templates/slidebar.php' ) );
}
}
hey floxt, has the above worked for you?
I want the sidebar to only appear on my my account page and tried , bit did not work
function output_slidebar(){
if( apply_filters(‘ns_slidebar_do_output’,true) && (is_page(‘my_account’) )){
include( apply_filters(‘ns_slidebar_template’, plugin_dir_path(__FILE__).’templates/slidebar.php’ ) );
}
}
I have also tried
function output_slidebar(){
if( apply_filters(‘ns_slidebar_do_output’,true) && is_page(‘my_account_business’,true) ){
include( apply_filters(‘ns_slidebar_template’, plugin_dir_path(__FILE__).’templates/slidebar.php’ ) );
}
}
also tried
function output_slidebar(){
if( apply_filters(‘ns_slidebar_do_output’,true) && is_page( $page = ‘front_page’) ){
include( apply_filters(‘ns_slidebar_template’, plugin_dir_path(__FILE__).’templates/slidebar.php’ ) );
}
}
AND THE WINNER IS – slidebar now only showing in my two my account pages
function output_slidebar(){
if( apply_filters(‘ns_slidebar_do_output’,true) && is_page( array( ‘my-account-business’,’my-account’))){
include( apply_filters(‘ns_slidebar_template’, plugin_dir_path(__FILE__).’templates/slidebar.php’ ) );
}
}
Thread Starter
floxt
(@floxt)
Well done 😉
To find the parameter for the is_page() function, check the wordpress documentation about the function.