• Resolved tmg-the-person

    (@tmg-the-person)


    Hey.

    So, someone on another forum (for another open source script) decided to insult me for posting a question I was obviously required to know the answer to (Like anyone should know to replace shorttags with proper PHP tags in the script’s /lib folder). Anyway, I’ve read WordPress’s policy for the use of this forum, and I think that the creators of WordPress should be given their knighthood, already. Thank you for making a wonderful script even more fantastic by a supportive community.

    Okay, back to my problem(?). I’m using WordPress as a CMS rather than a blogging tool, I’ve set up only the home page to display the news section (news posts). On the sidepanel of the home page a selection of links related to the news section (Archives, Categories and Recent Posts) are displayed.

    The weird thing is that posts from the category dedicated to EventCalendar are also displayed in the sidepanel. When I click on them, however, I’m redirected to the Page Not Found message …

    The question now is: How do I remove the posts belonging to the calendar from the sidepanel? I want to remove the Calendar category, as well as the posts that are posted in the Calendar category. Here’s the code for my sidepanel:

    <?php /* If this is the frontpage */ if ( is_home() ) { ?>

    <div id="sidenav">

    <h2 class="sidebar">Nuus Argiewe</h2>

    <ul id="sidenavlist1">

    <?php wp_get_archives('type=monthly'); ?>

    </ul>

    </div>

    <div id="sidenav">

    <h2 class="sidebar">Nuus Kategorie&euml;</h2>

    <ul id="sidenavlist2">

    <?php wp_list_cats('sort_column=name&hierarchical=0'); ?>

    </ul>

    </div>

    <?php

    $today = current_time('mysql', 1);

    if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 10")):

    ?>

    <div id="sidenav">

    <h2 class="sidebar">Onlangse Nuus</h2>

    <ul id="sidenavlist3">

    <?php

    foreach ($recentposts as $post) {

    if ($post->post_title == '')

    $post->post_title = sprintf(__('Post #%s'), $post->ID);

    echo "<li><a href='".get_permalink($post->ID)."'>";

    the_title();

    echo '</a></li>';

    }

    ?>

    </ul>

    </div>

    <?php endif; ?>

    …………………………………..

    I really hope that someone out there will be able to help me. I’ve been through the Documentation on the site, and the text is either oriented towards other things, or (and I think this is the case) floating above my head making absolutely no sense.

Viewing 2 replies - 1 through 2 (of 2 total)
  • See if this thread is of any help.

    Thread Starter tmg-the-person

    (@tmg-the-person)

    Thank you for the tip. I did some additional research, and with the help of two plugins, EventCalendar’s category is safely hidden from view. I’m writing a lengthy letter on my solution that I’ll post on EventCalendar’s mailing list.

    If someone wants me to post it here, I will do so on request (living in South Africa, where broadband is absurdly expensive, I’m used to conserving bandwidth) …

    This matter is now resolved.

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

The topic ‘Excluding Content From The Sidebar’ is closed to new replies.