101 posts
  • Elite Author
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
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
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 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' );
?>

2509 posts Put a Donk On It
  • Exclusive Author
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Attended a Community Meetup
  • Referred between 100 and 199 users
  • Contributed a Tutorial to a Tuts+ Site
+5 more
ThemeProvince says

You do know theres a plugin for piecemaker right?

101 posts
  • Elite Author
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
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
  • Elite Author
  • Referred between 100 and 199 users
  • Bought between 1 and 9 items
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
PixelBook says

You do know theres a plugin for piecemaker right?

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

3007 posts
  • Author had a File in an Envato Bundle
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 100 and 199 users
+2 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