Forums

[resolved] Sidebar code keeps on being automatically erased (5 posts)

  1. cjboertjens
    Member
    Posted 5 years ago #

    I was just adding a "subscribe to email" button to the sidebar and it didn't work properly so I removed it. I then saved the sidebar and it completely removed all the content in the sidebar.php file. I always keep a backup of the site and ftp-ed it to our server, but it keeps on automatically erasing the content in the sidebar.php file. I have no idea what is happening. Please let me know if anyone knows what to do. The website is http://www.orangepeel.co.nz and this is the sidebar code:

    <!--Default sidebar template-->

    <div id="sidecolumn">

    <div class="sidebar">
    <div class="left"><?php jpf_quotes(); ?>
    </div>
    </div>

    <div class="hr"></div>

    <div class="sidebar">

    </div>

    <!-- Sidebar quick about block -->
    <?php if (get_option('vSlider_quickabout_enabled')) { ?>
    <div class="hr"></div>

    <div class="sidebar">
    <?php echo stripslashes(get_option('vSlider_quickabout_text')) ?>
    </div>
    <?php } ?>

    <!-- Show subpages, if available -->
    <?php
    if (is_page() && $post) {

    $current_page = $post->ID;
    while($current_page) {
    $page_query = $wpdb->get_row("SELECT ID, post_title, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
    $current_page = $page_query->post_parent;
    }

    $parent_id = $page_query->ID;
    $parent_title = $page_query->post_title;

    $test_for_child = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id'");

    if($test_for_child) {
    ?>

    <div class="hr"></div>

    <div class="sidebar">
    "><h2><?php echo $parent_title; ?> </h2>

    <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>

    </div>
    <?php } } ?>

    <div class="hr"></div>

    <div class="sidebar">
    <!-- Categories -->
    <h2>What's Happening</h2>

    <?php list_cats(true, '', 'name', 'asc', '', true, false, true, true, true, true, 0, '',false,'',$rssimage,'',true) ?>

    </div>

    <div class="hr"></div>

    <div class="sidebar">
    <h2>OrangePeel Products</h2>
    <p align=center>Customized Vision Boards</p>

    <h3 align=center>Vision Board</h3>
    <div class="center"><img id="image79" src="http://www.orangepeel.co.nz/wp-content/uploads/2006/12/visionboard-box-opsite.JPG" alt="Start Creating Huge Success in Your Life" /></div>

    <h3 align=center>MLM Vision Board</h3>
    <div class="center"><img id="image78" src="http://www.orangepeel.co.nz/wp-content/uploads/2006/12/mlmvb_box_opsite.JPG" alt="Start Creating Huge Success in Your Network Marketing Business" /></div>

    </div>

    <div class="hr"></div>

    </div>

    Thanks!

  2. DianeV
    Member
    Posted 5 years ago #

    I don't understand this:

    it keeps on automatically erasing the content in the sidebar.php file

    Is WordPress not displaying your sidebar, or is something actually deleting the contents of the sidebar (so that when you open sidebar.php, there's nothing in it)?

    I'm wondering if your index.php actually calls sidebar.php.

    Lastly, I'd also look at sidebar.php. Without inspecting it minutely, I see what looks like an error:

    <div class="sidebar">
    "><h2><?php echo $parent_title; ?> </h2>

    See the closing quote and angle bracket before the h2? That may be causing problems.

  3. cjboertjens
    Member
    Posted 5 years ago #

    Hi Diane,

    I tried that, but it still keeps on deleting the content. What actually happens is that as soon as I click "Update File" is says "File edited successfully" and the whole screen is simply empty. All the text is gone. Then I copy paste the text into the window again and when I do the same thing, it is gone again. It seems like I can't put any content in the php file, because even when I ftp the file to the server, it automatically resets the file size to "0"

    Thanks,

    Cornelis

  4. Root
    Member
    Posted 5 years ago #

    This looks a bit Kubrickish to me. Sorry.

  5. cjboertjens
    Member
    Posted 5 years ago #

    Hi, thanks for the input. This issue has been resolved. It was with Dreamhost; something didn't allow me to upload/change my files anymore and every time I did they got erased.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags