anthalis 5 Report post Posted May 3, 2012 Hi there, I am in a bit of a situation here. I am trying to customize the boxes to include pricing information in an overlay on top of the box image. So far, I have successfully created the meta field to type in the new info, but I am having problems calling it on the front end. Can someone help me sort it out? I have to admit, with whatever I did so far, I got a bit lucky, since I am not and advanced php user. If I place the newly created $price in $content or $info it might take the value and display it, but the rest of the stuff (titles and links) will disapear. Can someone assist me with this? function draw_boxes($p, $args){ setup_postdata($p); $oset = array('post_id' => $p->ID); $box_link = plmeta('the_box_icon_link', $oset); $box_icon = plmeta('the_box_icon', $oset); $box_price = plmeta('box_price', $oset); $class = ( plmeta( 'box_class', $oset ) ) ? plmeta( 'box_class', $oset ) : null; $image = ($box_icon) ? self::_get_box_image($p, $box_icon, $box_link, $this->thumb_size, $this->thumb_type) : ''; if(plmeta('box_price', $oset)){ $price = plmeta('box_price', $oset); } elseif(ploption('box_price', $this->oset)){ $price = ploption('box_price', $this->oset); }else $price = false; $price = ($box_price) ? sprintf('%s', $box_price) : ''; $price = apply_filters('box_price', $price); $title_text = ($box_link) ? sprintf('%s', $box_link, $p->post_title ) : $p->post_title; $title = do_shortcode(sprintf('%s', $title_text)); if(plmeta('box_more_text', $oset)){ $more_text = plmeta('box_more_text', $oset); } elseif(ploption('box_more_text', $this->oset)){ $more_text = ploption('box_more_text', $this->oset); }else $more_text = false; $more_link = ($box_link && $more_text) ? sprintf('%s', $box_link, $more_text) : ''; $more_link = apply_filters('box_more_link', $more_link); $content = sprintf('%s %s %s', do_shortcode($p->post_content), pledit( $p->ID ), $more_link); $info = ($this->thumb_type != 'only_thumbs') ? sprintf($price, '%s%s', $title, $content) : ''; return sprintf('%s%s', 'fbox_'.$p->ID, $class, $this->thumb_type, $image, $info); }[/code] Share this post Link to post Share on other sites
Rob 547 Report post Posted May 3, 2012 That's a very interesting question and you've done exceptionally well with that site. Unfortunately, the level of customization you're seeking requires one of our Pros found at http://www.pagelines.com/pros It's important to use one of them in such cases, so that the coding you're trying to achieve doesn't adversely impact other things in the site. Apologies that I couldn't be of greater assistance. Former PageLines Moderator, Food Expert and Raconteur Share this post Link to post Share on other sites