101 posts
  • Weekly Top Seller
  • Elite Author
  • 4 Years of Membership
  • Affiliate Level 4
+3 more
PixelBook
says

Hello! I’m trying to add a piecemaker slider to a wordpress theme and I need to retrieve post meta to the configuration XML file of the slider.

But when I write something like this

$piecemaker_height=get_post_meta($post->ID, ‘value’, true);

it doesn’t retrieve anything.

Normally I use this

$piecemaker_height = get_option(‘value’)

but the value is different from post to post so I can’t use it here.

At the top of the XML file I have require_once( ’../../../../wp-load.php’ );

but it doesn’t seem to work.

Any help would be appreciated. Thanks

3007 posts
  • 5 Years of Membership
  • Affiliate Level 5
  • Author Level 9
  • Bundle Boss
+8 more
duotive
says
Yellow. Try this to include the wp-load.

<?php $absolute_path = __FILE__;
    $path_to_file = explode( 'wp-content', $absolute_path );
    $path_to_wp = $path_to_file[0];
    require_once( $path_to_wp.'/wp-load.php' );
?>

2627 posts Put a Donk On It
  • Weekly Top Seller
  • Elite Author
  • Exclusive Author
  • Featured Author
+11 more
ThemeProvince
says

You do know theres a plugin for piecemaker right?

101 posts
  • Weekly Top Seller
  • Elite Author
  • 4 Years of Membership
  • Affiliate Level 4
+3 more
PixelBook
says

Yellow. Try this to include the wp-load.

<?php $absolute_path = __FILE__;
    $path_to_file = explode( 'wp-content', $absolute_path );
    $path_to_wp = $path_to_file[0];
    require_once( $path_to_wp.'/wp-load.php' );
?>

Thanks but, still doesn’t retrieve the data. The require sytnax is correct otherwise it wouldn’t show the slider, but it does. I was wondering if I need to include something else from the wordpress installation.

101 posts
  • Weekly Top Seller
  • Elite Author
  • 4 Years of Membership
  • Affiliate Level 4
+3 more
PixelBook
says

You do know theres a plugin for piecemaker right?

Yes I know, but it’s not what I need

3007 posts
  • 5 Years of Membership
  • Affiliate Level 5
  • Author Level 9
  • Bundle Boss
+8 more
duotive
says

This is incredible! My designer is going nuts!

We helped you with code on many occasions, and now that we’ve released a brand new looking theme, after just a week there you have it, the perfect slideshow. What you are doing isn’t fair. And besides copying the design and structure and all, it even has some invalid basic html coding !!! You should be ashamed of yourself! Did you think that modifying a height and a width would make a difference ? And the code is pretty much the same, only your using jQuery. Very nice! You have style!

by
by
by
by
by
by