Support » Themes and Templates » functions not working outside of blog directory

  • on my site I have wordpress (2.7) installed in a directory called blog. on the homepage of my domain (which does not use wordpress), I want to show the latest posts. I use this code which works well.

    $max_posts = 2;
    if (have_posts()) :
    	while (have_posts()) : the_post();
    		<div class="section">
    			<?php include $BLOG_THEME_DIR."shortpost.php";?>
    else :
    	//do nothing

    For every post, I’m including a file in my theme folder called shortpost.php, which shows a short version of the post. This works quite well, but I’m encountering a few issues:
    1) my file shortpost.php uses a function to add the default upload folder to an image’s url. I have defined this function in functions.php in my theme folder. This works fine on my site’s homepage on my local webserver, but not online: there the function seems to be ignored. (online I’m using pretty urls, which I couldn’t get to work locally – could that make a difference?)
    2) I have defined a few shortcodes. None of these seem to function on my site’s homepage, both locally and online (they work fine inside the blog directory).

    I haven’t got a clue as to where to begin solving these issues. Can anyone point me into the right direction?

  • The topic ‘functions not working outside of blog directory’ is closed to new replies.