• I want to have my widgets get displayed throughout my site except for 1 page, my store. I tried creating a template for my store that does not call the sidebar but I still get the widgets being displayed. I tried removing php get_sidebar(); in my store template but I get an error 404

    Is there a way to remove the widgets from a single page?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I’d be interested in this too. I guess the answer may lie in building a seperate style sheet (style.css) without the sidebar and widgets. It’d be nice to be able to have a ‘stylesheet menu’ option in admin so you can choose the ‘theme’ of individual pages.

    The old version of K2 had optimal customization for widget visualization in each page, now I can’t find it anymore. Now I’m interested in this issue too.

    edit: found this

    speedy11184 & ndigotwilight,

    Never ask theme/design/layout realted questions without a link, naming the theme, showing what you did till now etc.

    You need a separate Page template that doesn’t have the call for the sidebar: that was a good start. Additionally, you may have to alter its html code and use some new div classes (and proper styling in the stylesheet) to make the content to fill out the “empty space” of the lacking sidebar.

    Thanks for the feedback. ?? Although I have a new blogg up and running, this currently uses an existing theme as a temporary measure. (https://www.Lowenva.net) I’m using the Blogg more of as an online journal and diary, with links to my other sites in the Bloggroll.

    I’m building a new theme using a seperate desktop version of WordPress installed via XAMPP. I’m also running test versions of SMF and Tiny Portal as well. Ultimately, I want to get these systems to ‘talk’ to each other across different databases so recent posts on the forums could be listed in the WordPress Blogg, etc. I know there are some mods and plugins developed for this already, but most seem to deal with integrated membership, rather than exchanging articles… My idea is for a forum to email the title and first few lines of a new post so it can be read by WordPress’ ‘Blogg by email’ function.

    As far as the current topic issue goes: I’m still experimenting with different style sheets and layouts. I’m attempting a ‘multitheme’ structure, where pages, articles, the homepage and posts have slightly different themes attached to them (this can either be in widgets not showing for certain pages, alternative backgrounds, and/or layouts) I tend to learn programming just by trying things out. Using XAMPP has the benefit that if I end up making the blogg or forum unusable, I can always just reload a new one.

    Once I’ve got it right, then I’ll of course FTP my new design into Lowenva for all to see and comment upon. Though, this may take some time. ??

    Twilight

    I found this thread whilst searching for a way to completely remove widgets for certain pages.

    I ended up creating a workaround on my own. It’s probably not a very good one, but it worked for what I wanted to do (remove all of the widgets for two special pages on the website)

    I don’t claim to know what I am doing when it comes to PHP so take my workaround with a grain of salt.

    I deleted most of the sidebar.php file and placed this:

    <div id="l_sidebar">
    	<ul class="sidebar_list">
    		<?php if (is_page(array('drapes','upholstery')))echo "<div style='height: 1800px; background-color:#69ABE4;'>&nbsp</div>";
    elseif  (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) ; ?>
    
    	</ul>
    </div>

    so,

    <?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) : ?>

    becomes:

    <?php if (is_page(array('drapes','upholstery')))echo "<div style='height: 1800px; background-color:#69ABE4;'>&nbsp</div>";
    elseif  (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1)) ; ?>

    This,
    (is_page(array('drapes','upholstery') , is a conditional tag

    and the pages (drapes, and upholstery) are the ones that I don’t want widgets on.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘remove widgets from certian pages’ is closed to new replies.