Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • I am getting the “ERROR: Cookies are blocked due to unexpected output.” too. I’ve performed a fresh install using WP 4.3 & 4.7, and once I am done installing, even before I enter my login info, the wp-login page shows that msg above the login.

    I’ve tried renaming the twentysixteen and twentyfifteen theme folders (so as to force it to default to the twentyfourteen theme, but it’s still not letting me into the dashboard.

    Thread Starter DaveHS

    (@davehs)

    Disregard. The answer has been found.

    How to display different sidebar on different pages

    Basically, one needs to modify the functions.php so as to “register” the pages. As to the scripting to use, see the link above.

    :-\ Dave

    LOL! Talk about timing!

    Thanks Moshu, I found the same info, only in a different spot (Widgetizing Themes)! I appreciate you “trying to teach me to fish instead of just feeding me fish”, however the only problem is I am doing all this during my lunch times at work on the overnight shift!

    For anyone else visting this page who is having this problem (uploaded sidebars not appearing in the “Current Widgets” drop down box), the short answer is you have to modify the “functions.php” file, and add php scripting manually to “register” the other sidebar php files.

    In my case, here is what it looks like:

    <?php
    if ( function_exists('register_sidebars') );
    
    register_sidebar(array('name'=>'sidebar',));
    register_sidebar(array('name'=>'sidebar_about',));
    register_sidebar(array('name'=>'sidebar_news',));
    register_sidebar(array('name'=>'sidebar_george',));
    register_sidebar(array('name'=>'sidebar_dave',));
    register_sidebar(array('name'=>'sidebar_library',));
    register_sidebar(array('name'=>'sidebar_links',));
    register_sidebar(array('name'=>'sidebar_contact',)); 
    
    ?>

    But in the end, again, thank you Moshu for your assistance! :-p
    Respects, Dave

    Thanks Moshu, tried to search that but to no avail.

    Most posts discuss adding the same widget to multiple sidebars. The problem in my case, however, is that my “Current Widgets” drop down box is missing 6 of the 8 sidebars I have uploaded to the server.

    Anyone else have any ideas on how to get the missing sidebar php’s to show up in the “current widgets” drop down box?

    Thanks, Dave

    Ok, after a little more digging, I was finally able to find the solutions to my 1st set of questions, that being what would be the format of the PHP scripting required to get each page to have it’s own side bar, & what *.php document to modify it in.

    Q1: Thanks to someone else reporting the issue (Custom sidebar per page), I was able to figure out that this is how part of the scripting would look in my case:

    } elseif (is_page()) {
            // we're looking at a static page.  Which one?
            if (is_page('About')) {
                 // our about page.
                 include(TEMPLATEPATH . '/sidebar_about.php');
            } elseif (is_page('3')) {
                 include(TEMPLATEPATH . '/sidebar_news.php');
            } elseif (is_page('5')) {
                 include(TEMPLATEPATH . '/sidebar_george.php');
            } elseif (is_page('6')) {
                 include(TEMPLATEPATH . '/sidebar_dave.php');
            } elseif (is_page('8')) {
                 include(TEMPLATEPATH . '/sidebar_library.php');
            } elseif (is_page('10')) {
                 include(TEMPLATEPATH . '/sidebar_links.php');
            } elseif (is_page('7')) {
                 include(TEMPLATEPATH . '/sidebar_contact.php');
            } else {
                  // catch-all for other pages
                 include(TEMPLATEPATH . '/sidebar.php');        }

    Q2: As to what document to modify, it is the actual file acting as the primary “sidebar.php”, as dictated by what is in “page.php”

    Now, however, my 2nd set of questions regarding widgets come into play.

    When in the “Design/Widgets” site admin screen, the “Current Widgets” box on the right hand side of the page does not list all the sidebar php pages I have uploaded in my theme directory. How do I get all my other uploaded sidebar files such as “sidebar_george.php”, “sidebar_dave.php”, etc, to be added to that list?

    Inching my way forward! Sorry for my newbie-ness! I love WP 2.6, but it’s taking a lot of getting used to! :-p

    Thanks Moshu.

    I read that, and I was aware of all of it, and what I was referring to was the difference between the older version of WP I was using (I don’t recall which one it was) & this one. I actually enjoy the fact that I can modify my pages now directly in the admin panel, but the point I was trying to make is where to go to modify each to display it’s own sideabar & more importantly, what exactly to write (as everything I know, most being HTML & XML, has been self taught, and I am not totally fluent in PHP yet).

    My questions remain the same, what to write, and which file to modify. Thanks

    Hello all;

    Sorry in advance if this sounds either repetative or uninformed, but I too am a WP newbie, and it seems multiple issues are being discussed above, and having just gotten used to being able to work with “different sidebars on different pages” in an older version of WP, I am now totally lost! I can’t even find what sub folder the pages are actually stored in! If someone could provide a “laymen” explanation, I would be so ever indebted! :-p

    For ease of explanation, I am working on https://firefoxnewsonline.net .

    Basically, what I want to do is have each “page” (aside from the “home” page) display a different sidebar (ie: sidebar_george.php, sidebar_dave.php, sidebar_library.php, sidebar_contact.php, etc). That said, i think I’ve figured out I have to add a “elseif” php script, though I am not sure exactly how to word it, and more importantly, which “.php” I need to add it to (page.php, template.php, etc), etc.

    But based on what I read above, I guess I now have a 2nd question, once I get the 1st one resolved of course! Some of the pages I want to have different sidebars for will also have different widgets. For example may have a polling widget, whereas another will have a youtube widget. Is this possible, and if so, what text do I have to add to what page?

    Again, sorry for my “layman” lameness, but struggling to figure this out! Thanks in advance for any assistance anyone provides.

    Respects
    Dave

Viewing 7 replies - 1 through 7 (of 7 total)