Jump to content
Sign in to follow this  

Overlay new plmeta over box images

Recommended Posts


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){
			$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);
				$price = false;
	                $price = ($box_price) ? sprintf('
', $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('


', $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, '
', $title, $content) : ''; return sprintf('
', 'fbox_'.$p->ID, $class, $this->thumb_type, $image, $info); }[/code]

Share this post

Link to post
Share on other sites
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this