101 posts
  • Has referred 100+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 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
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 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' );
?>

2588 posts Put a Donk On It
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
  • Made it to the Authors' Hall of Fame
  • Has sold $250,000+ on Envato Market
+10 more
ThemeProvince says

You do know theres a plugin for piecemaker right?

101 posts
  • Has referred 100+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 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
  • Has referred 100+ members
  • Has sold $125,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+2 more
PixelBook says

You do know theres a plugin for piecemaker right?

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

3007 posts
  • Has been part of the Envato Community for over 4 years
  • Has referred 200+ members
  • Has sold $250,000+ on Envato Market
  • Had an item featured in an Envato Bundle
+7 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!

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by