Code Consolidation

Sitepoint Members,

I have this code in a file
<?php
if (($topleftbox = get_post_custom_values(‘topleftbox’)) && isset($topleftbox[0]))
echo $topleftbox[0];
include (TEMPLATEPATH . ‘/sidebarleft.php’) ?>

I don’t want it to fetch the code contents of the file sidebarleft.php anymore. I would like the code of sidebarleft in this same file.

If sidebar left code is
<ul>
<li><a href=“/xyz/”>yyyyy</a></li>
.
.
.
</ul>

How would I replace this
include (TEMPLATEPATH . ‘/sidebarleft.php’)

with
<ul>
<li><a href=“/xyz/”>yyyyy</a></li>
.
.
</ul>

Thanks,

Chris

You could just echo it or have it not in php tags…

<?php
if (($topleftbox = get_post_custom_values('topleftbox')) && isset($topleftbox[0]))
echo $topleftbox[0];
?>
<ul>
<li><a href="/xyz/">yyyyy</a></li>
.
.
.
</ul>
<?php

// more php code!

?>
More html can go here too...

<?php 

// and then more php!?

?>

Nawmean?

Zurev,
I didn’t realize you could start and stop coding in the two languages again and again in the same file. I’ll work it out on my site.

Thanks Z,

Chris

Zurev,
That worked out great. Helps my site load much faster.

Is it possible to move my theme folder “mytheme” out of the “themes” folder and put it into the webroot of my site and the site would still work normally?

Thanks Zurev,

Chris

Zurev,

Maybe I should say it this way. Where is the line of code that says find the “mywebsitetheme” folder at such n such location?
Maybe this needs to be sent to the wordpress forum.

Thanks,

Chris

Oh wow, I didn’t even realize this was wordpress.

Okay, if this theme you’re editting is set to the active theme, just do a die(TEMPLATEPATH), or you can do it where it’s defined, which is most likely functions.php.

Once you’ve done that you can see where it’s being included from and work with it from there.

Zurev,
This is what’s in functins.php

<?php if ( function_exists(‘register_sidebars’) ) register_sidebars(2) ?>
<?php remove_action(‘wp_head’, ‘wlwmanifest_link’); remove_action(‘wp_head’, ‘rsd_link’); remove_action(‘wp_head’, ‘index_rel_link’); remove_action(‘wp_head’, ‘wp_generator’) ?>
((What does that first php line do?))

I don’t see anything useful in there. How do I do a die(TEMPLATEPATH) ?

Thanks a bunch,

Chris

-second-
I figured out that first question (It’s for sidebars/widgets).

Zurev,

But I could’t fin any useful information on the web for doing a “die(TEMPLATEPATH) ?” How do you do that?

Chris