By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,190 Members | 1,063 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,190 IT Pros & Developers. It's quick & easy.

Call to undefined function _parent_where_query() in

zemsiz
P: 3
is there anyone to answer this?

Hello to everyone..

i upload a theme to my wordpress. but a section isn't working correctly,

i get that fatal error: Fatal error: Call to undefined function dt_parents_where_query() in /xxx/xxxxx/public_html/anasayfa/wp-content/themes/xxxxxx/front-gal-plus.php on line 22

and the codes are below:

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. $box_name = 'homeslider';
  3. $images = array();
  4. $options = get_post_meta( $post->ID, 'dt_'.$box_name.'_options', true );
  5. $arr = $options['show_'. $box_name. '_'. $options['show']];
  6. $args = array(
  7.     'post_type'         =>'attachment', 
  8.     'post_mime_type'    =>'image',
  9.     'post_status'         =>'inherit',
  10.     'orderby'            =>'menu_order',
  11.     'posts_per_page'    =>-1
  12. );
  13. $query_str = sprintf( 'SELECT `ID` FROM %s WHERE `post_type`="%s"', $wpdb->posts, 'main_slider' );
  14. if ( is_array($arr) ) {
  15.     $query_str .= ' AND ID';
  16.     if ( 'except' == $options['show'] ) {
  17.         $query_str .= ' NOT';
  18.     }
  19.     $query_str .= sprintf( ' IN(%s)', implode( ',', $arr ) );
  20. }
  21. // send query to filter
  22. _parent_where_query( $query_str );
  23.  
  24. add_filter( 'posts_where' , 'dt_posts_parents_where' );
  25. $slides = new Wp_Query( $args );
  26. remove_filter( 'posts_where' , 'dt_posts_parents_where' );
  27.  
  28. // process images
  29. foreach( $slides->posts as $slide ) {
  30.     $image = wp_get_attachment_image_src($slide->ID, 'large');
  31.     $small_image = esc_attr(get_template_directory_uri()."/thumb.php?src={$image[0]}&w=102&h=62zc=1");
  32.  
  33.     $images[] = array(
  34.         "orig_image"        => $image,
  35.         "small_image"        => esc_attr($small_image)
  36.     );
  37. }
  38. ?>
  39.  
  40.  
  41. <!-- For the greate [justice] example -->
  42. <script type="text/javascript">
  43.     slideshow_timeout_sec = <?php echo intval($options['dt_interval']); ?>;
  44. </script>
  45.  
  46. <ul id="big-image">
  47. <?php
  48.    $reverse = $images;
  49.    $reverse = array_reverse($reverse);
  50.    foreach ($reverse as $image)
  51.    {
  52.    ?>
  53.       <li><img src="<?php echo $image['orig_image'][0]; ?>" alt="<?php echo $image['orig_image'][1]; ?>|<?php echo $image['orig_image'][2]; ?>" title="" /></li>
  54.    <?php
  55.    }
  56. ?>
  57. </ul>
  58.  
  59. <?php if( !$options['dt_hide_over_mask'] ): ?>
  60. <div id="big-mask-sl"></div>
  61. <?php endif; ?>
  62.  
  63. <div id="big-mask-sl_b"></div>
  64.  
  65. <div id="slider">
  66.   <div>
  67.     <ul>
  68.       <?php
  69.          foreach ($images as $image)
  70.          {
  71.          ?>
  72.             <li><a href="#"><img src="<?php echo $image['small_image']; ?>" width="102" height="62" alt="" /><i></i></a></li>
  73.          <?php
  74.          }
  75.       ?>
  76.     </ul>
  77.   </div>
  78. </div>
  79.  
  80. <div id="slider_controls">
  81.   <div>
  82.     <ul>
  83.       <li><a href="#"><img src="<?php echo $images[0]['small_image']; ?>" alt="" width="102" height="62" /></a></li>
  84.     </ul>
  85.     <a href="#" id="control_play"></a>
  86.     <a href="#" id="control_pause"></a>
  87.     <a href="#" id="control_f"></a>
  88.     <a href="#" id="control_b"></a>
  89.   </div>
  90. </div>

Thanks a lot...
Feb 8 '12 #1
Share this Question
Share on Google+
2 Replies


zemsiz
P: 3
isn't there any one, can help me about it?
Feb 8 '12 #2

zemsiz
P: 3
is there any suggestion?
Feb 16 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.