CSS3 PIE Forums
http://css3pie.com/forum/

Integrating PIE into WordPress Themes
http://css3pie.com/forum/viewtopic.php?f=4&t=8
Page 2 of 5

Author:  Luker [ Tue Jan 04, 2011 1:11 pm ]
Post subject:  Re: Integrating PIE into WordPress Themes

I tried using your code within my modified Starkers theme functions.php file and couldn't get it to work. When I would refresh the page after uploading the functions.php it would give me an error. I could not see what was wrong with the code.

So then I just inserted the if IE statement into my header and that was fine. I guess its sloppy to have it sitting in the header like that, but I'm not so awesome with php yet to debug the problem.

Thanks so much for putting this up!

Author:  OrangeDevDesign [ Fri Jan 21, 2011 6:00 am ]
Post subject:  Re: Integrating PIE into WordPress Themes

Heelp, please, i can't figure out how to make it work :/

Author:  kanjigirl [ Sat Jan 22, 2011 5:09 pm ]
Post subject:  Re: Integrating PIE into WordPress Themes

I can't get the first example to work, I'm using Theme Hybrid and modified it slightly:

Code:
function my_render_ie_pie() {
   ?>
<!--[if lte IE 8]>
<style type="text/css" media="screen">
   div#footer, #respond input#submit {
      behavior: url(<?php echo get_stylesheet_directory_uri(); ?>/pie/PIE.htc');
   }
</style>
<![endif]-->
   <?php
}
add_action('hybrid_head', 'my_render_ie_pie', 8);


I've tried the php, htc and js versions of PIE in the behavior line, none are working. Both the Submit button and red footer box on this page should have the rounded corner treatment in IE8:

http://www.redkitecreative.com/projects ... er-themes/

Can someone help me get this working?

Author:  billrobbins [ Sat Feb 05, 2011 7:48 am ]
Post subject:  Re: Integrating PIE into WordPress Themes

That's a great solution. I wanted to place the styling inside a stylesheet so here is what I came up with. Create a file called ie-pie.css.php and then load the stylesheet using:

Code:
<!--[if LTE IE 8]>
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/ie-pie-css.php" type="text/css" media="screen" />
<![endif]-->
<!--[if LTE IE 7]>


Here's how I set up the file. The first part is to locate wp-load.php since we could be in a sub-directory. Then below that is a stylesheet with a php link to PIE.htc.

Code:
<?php    
   
   if ( defined( 'ABSPATH' ) )
       require_once( ABSPATH . 'wp-load.php' );
   else {
      if ( file_exists( '../../../../../wp-load.php' ) )
         require_once('../../../../../wp-load.php');
      elseif ( file_exists( '../../../../wp-load.php' ) )
         require_once('../../../../wp-load.php');
      elseif ( file_exists( '../../../wp-load.php' ) )
         require_once('../../../wp-load.php');
      elseif ( file_exists( '../../wp-load.php' ) )
         require_once('../../wp-load.php');
      elseif ( file_exists( '../wp-load.php' ) )
         require_once('../wp-load.php');
      else
         die( 'Fatal Error: Could not locate wp-load.php' );
   }
   
   header('Content-Type: text/css; charset: UTF-8'); ?>

<!-- This file contains CSS3 styles for Internet Explorer 8 and under  (link
   behavior: url(<?php echo get_template_directory_uri(); ?>/PIE.htc); )-->


.shadow {
   -webkit-box-shadow: 0px 1px 3px #141414;
   -moz-box-shadow: 0px 1px 3px #141414;
   box-shadow: 0px 1px 3px #141414;
   behavior: url(<?php echo get_template_directory_uri(); ?>/includes/PIE.htc);
}


It's just another option for you to try out.

Author:  vitor.casadei [ Sat Feb 12, 2011 11:38 am ]
Post subject:  Re: Integrating PIE into WordPress Themes

Well, does any of this codes works totaly for Wordpress?

Author:  GrahamA [ Mon Feb 14, 2011 5:16 am ]
Post subject:  Re: Integrating PIE into WordPress Themes

It seems that some people are still having problems with Wordpress integration so I'll repeat my solution which is a bit simpler, but does only work if you have access to the root folder of your (or your client's) site.

1) Place the PIE.htc and PIE.php files in the root folder of the site - not in the Wordpress theme directory.

2) When you add the behaviours to your CSS file use:
Code:
behavior: url(/PIE.php)
- note the / before PIE.php which is an absolute path to the root folder of the site where you put the two files.

That's it.

See this Wordpress site which shows it working: http://www.sunnyfuturesolar.co.uk/

Hope this helps.

Author:  D4wud22 [ Wed Feb 16, 2011 9:56 pm ]
Post subject:  Re: Integrating PIE into WordPress Themes

Since this is what I want to make happen to integrate the PIE successfully into WordPress Theme. But unfortunately, I was failed to integrate the PIE. I should try this code and I am hoping that it is working fine now.

Author:  crawley [ Wed Mar 23, 2011 7:54 am ]
Post subject:  Re: Integrating PIE into WordPress Themes

@billrobbins

I can confirm it works. I came up with something similar, but, the concept is the same, and it works cool.

Author:  trewknowledge [ Mon Aug 01, 2011 2:01 pm ]
Post subject:  Re: Integrating PIE into WordPress Themes

Hey guys,

I am having a bit of a hard time getting this to work in my WP Theme. I have added the following code in my functions.php file

Code:
/**
* Attach CSS3PIE behavior to elements
* Add elements here that need PIE applied
*/
function my_render_ie_pie() {
   echo '
<!--[if lte IE 8]>
<style type="text/css" media="screen">
  ul#brands li, .meta, #contactform input, #contactform textarea {
      behavior: url('.trailingslashit(get_bloginfo('template_url')).'pie/PIE.php);
   }
</style>
<![endif]-->
';
}
add_action('wp_head', 'my_render_ie_pie', 8);


However when the page loads in IE 8 or 7 it looks like it is removing the background or something on the elements that require a box shadow or rounded corner.

My site is http://trewknowledge.com/wordpress/news

And the element on this page is the white box that contains the post date.

Any suggestions welcomed!

Author:  Tonttu [ Mon Aug 01, 2011 2:37 pm ]
Post subject:  Re: Integrating PIE into WordPress Themes

It's a z-index issue: http://css3pie.com/documentation/known-issues/#z-index
If I disable the #main div background I can see the white boxes with rounded corners and shadows.

Page 2 of 5 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/