Jump to content
Sign in to follow this  
dtraub

Feature Boxes and PHP

Recommended Posts

dtraub

Can I put HTML and PHP code in a feature box?

Share this post


Link to post
Share on other sites
Andrew

you can put HTML by default... to get php we recommend using ShortCodes and to do that you have to make a small modification to the template code.

Share this post


Link to post
Share on other sites
dtraub

ShortCodes will work. What modification will I need to make?

Share this post


Link to post
Share on other sites
Andrew

we need to wrap the feature output in the feature box template; with `do_shortcode();` feel comfortable doing that?

Share this post


Link to post
Share on other sites
dtraub

Sure...? Never done that before so it'll be a first, but a fair amount of what I've done so far is what I thought was over my head when I started. Would I just... <?PHP do_shortcode( then all the feature box code ); ?> On another note... when an iblog pro update comes out, what happens to any of the code changes I made?

Share this post


Link to post
Share on other sites
Andrew

I like that attitude :) more like this: `

<?php echo do_shortcode($fbox['title']);?>
<?php echo do_shortcode($fbox['text']);?>
`

Share this post


Link to post
Share on other sites
dtraub

OK... I want to make sure I'm doing this right... In the template_fboxes.php file that's in the pro folder I replace <div class="fboxcopy"> <div class="fboxtitle"><?php echo $fbox['title'];?></div> <div class="fboxtext"><?php echo $fbox['text'];?></div> </div> with.,.. <div class="fboxcopy"> <div class="fboxtitle"><?php echo do_shortcode($fbox['title']);?></div> <div class="fboxtext"><?php echo do_shortcode($fbox['text']);?></div> </div>

Share this post


Link to post
Share on other sites
Andrew

yup :)

Share this post


Link to post
Share on other sites
dtraub

Thanks! That worked perfect. Last question... (for now at least)... when an iblog pro update comes out, what happens to any of the code changes I made?

Share this post


Link to post
Share on other sites
Andrew

We've added this feature to the next set of updates actually.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×