Is dxx a theme? If so, I’m guessing that something like the code below appears in your sidebar:
<?php if (is_home()) {
wp_calendar();
} ?>
Could you post any code from the sidebar that you think might be relevant?
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
<?php get_links_list(); ?>
- <h2><?php _e(‘Archives’); ?></h2>
<?php wp_get_archives(‘type=monthly’); ?>
<?php get_calendar(3); ?>
This is the code in the side bar
Thanks
Yeah, it’s inside a conditional block, so it will only show up on the fron page or a page.
In PHP (and many other languages) conditional blocks look a bit like this:
if (some condition is true) {
do this action
}
that means that the code “do this action” will only be executed if “some condition is true”.
In your case, <?php get_calendar(3); ?>
will only be executed if the front page or a page is being shown (a “page” in wordpress is like an “about” section that isn’t time-dependent, like blog posts are).
You need to find the ending curly bracket }
which signifies the end of the conditional block. That might be tricky to find, though (there will most likely be a bunch of else
statements, which confuse the matter). If you like, you can paste the entire contents of sidebar.php onto pastebin.com, and I’ll take a look at it for you.
You need to give me the link to the pastebin item, though 😉
Thanks maerk
I have found the closing curly bracket and moved the command outside it which solves the problem. If you want to check my sidebar code it is at
http://pastebin.com/739046
Thanks tj
I’m glad it’s working for you. I think you gave me the wrong pastebin link, but if it’s working, then that’s fine.