php include wrapped in a widget area...?


Author Message
Mac-The-Lad

Posted: 1/30/2010
Quote message 

How do you correctly use a
php include wrapped in a widget area...?

<div class="art-Block">     <div class="art-Block-tl"></div>     <div class="art-Block-tr"></div>     <div class="art-Block-bl"></div>     <div class="art-Block-br"></div>     <div class="art-Block-tc"></div>     <div class="art-Block-bc"></div>     <div class="art-Block-cl"></div>     <div class="art-Block-cr"></div>     <div class="art-Block-cc"></div>     <div class="art-Block-body"> <div class="art-BlockHeader">     <div class="l"></div>     <div class="r"></div>     <div class="art-header-tag-icon">         <div class="t"><?php _e('Sidebar Stuff', 'kubrick'); ?></div> <?php include (TEMPLATEPATH . '/sid.php'); ?>



the content from the sid.php should then show up
in a sidebar widget block.....?

the above doesnt work i know

any help on this what im just not getting right...
please...

i know its something simple but just cant get me head roung it..

thanks
 
Adeptris

Posted: 1/30/2010
Quote message 

If you are talking about a sidebar then add your call in the sidebar.php file,
add another div inside of your sid file and insert your php call.


// Add your call here or just inside the "art-sidebar2 div!
<?php include (TEMPLATEPATH . '/sid.php'); ?>

<div class="art-sidebar2">
<?php if (!art_sidebar(2)): ?>
<div class="art-Block">


sid.php will look something like:

<?php if( function_exists('where_is_sid')) {?>
<div id="my-sid">
<div class="inner">
<? php where_is_sid(); ?>
</div>
</div>
<?php } ?>


Then you will have css for my-sid


.art-contentLayout .my-sid
{
position: relative;
margin: 0px;
padding: 0;
border: 0;
float: left;
width: 195px;
height: 250px
overflow: hidden;
}


This is untested but may help

David

David
 
Adeptris

Posted: 1/30/2010
Quote message 

<? php where_is_sid(); ?> 

should have been
<?php where_is_sid(); ?> 

 
Mac-The-Lad

Posted: 1/30/2010
Quote message 

here is what i have so far

my sid.php file only has

<div class="vid-ad">
<?php echo stripslashes(get_option('artisteer_videoad')); ?>
</div>


already have css style to possition the video
but need to get a widget box around it.


without using a php include and just adding this

<div class="vid-ad">
<?php echo stripslashes(get_option('artisteer_videoad')); ?>
</div>

to the sidebar how would i add the widget box
around it..

thanks..
 
Mac-The-Lad

Posted: 1/30/2010
Quote message 

forgot to add that im calling the code from
my own theme admin
and it works just no widget box around it.

 
Adeptris

Posted: 1/30/2010
Quote message 

You need to style the Vid-Ad with the elements from your themes css.

look for /* begin Box, Block */

Add a comma space period like , .vid-ad where you think it is needed and your div will inherit the style:

example:
.art-Block

.art-Block, .vid-ad

If that does not help then look in functions.php at the art-sidebar code, this may help.

David



 
Mac-The-Lad

Posted: 1/30/2010
Quote message 

Thanks for all the help mate
i will be trying to sort this out over the next
few days...

but right now i made a simple work around

made a simple wp plugin with the

<div class="vid-ad">
<?php echo stripslashes(get_option('artisteer_videoad')); ?>
</div>

inside it and it works as needed
but will still be trying to work it into the actual theme
at some point using your help

thank you........