Forum Replies Created

Viewing 15 replies - 16 through 30 (of 62 total)
  • Thread Starter Steve Borsch

    (@sborsch)

    Thanks pr1nc3. I didn’t have that quite right so now it’s gone. Appreciate the help.

    bump

    Been waiting for this to be responded to as we’d like to do the same thing.

    Hi Elizabeth,

    Frameworks are kind of a big topic to address so instead, here is a link to the WordPress codex discussion on frameworks. It also has some links you should take a peek at near the bottom.

    Hope this helps.

    Hmm…this is not easy. Using “remove_meta_box” gives all sorts of “isset” errors. Any way to just hide them?

    Was wondering the same thing as kbpalmer and have attempted to write a filter to remove specific parts of the metaboxes (but it hasn’t worked).

    Why a filter? Like kbpalmer we could edit listing-details-metabox.php but it would be overwritten in an update *and* because “Extended Details”, “Additional Details” and “Price Options” don’t work for my client. We’ve registered other taxonomies that work for them perfectly and are easier to query and display.

    Two questions:

    1) Do you have any filter code you could provide that would, in fact, remove “Extended Details” and “Additional Details” and “Price Options”?

    2) Would removing them cause an issue now or a future issue if my client wanted to import IDX listings?

    Thread Starter Steve Borsch

    (@sborsch)

    I stand corrected…it does work. It adds a role to “customer” which is great.

    Thread Starter Steve Borsch

    (@sborsch)

    Good suggestion. I’ll do that now.

    Thread Starter Steve Borsch

    (@sborsch)

    Um no….we couldn’t hold a candle to Jason and team as far as coding is concerned and, as a rule, never-ever patch core code (just add functions). That’s why I put in the link to that other plugin as a concept-validation point.

    Thread Starter Steve Borsch

    (@sborsch)

    Yes, we sure have and also written (and modified) code for our client’s needs.

    Just to reiterate though, the issue is have a client-selectable (i.e., non-coding) solution to the S2Member level selection need.

    Should have also mentioned that you can see what the “Pro” version of the plugin does by looking at the documentation.

    ballyhoo, the issue is importing in to a custom post type and why one would use something like WP All Import or a .csv importing tool. I have had some success:

    a) Using WP export to create an xml file of the custom post type’s posts

    b) Using a text editor to change the taxonomy names to be the same as the WP post categories and tags to which I’m importing, but it will depend on what you want to import in. If it is postmeta data and custom fields, that’s really hard to do this way.

    You’re welcome. It’s always a challenge to get people to participate. I know I find solutions often and have recently taken to investing more time in adding potential solutions I’ve found.

    Glad it helped point the way!

    It is possible. Plus, you can do a lot more as well.

    Two ways to do what you want:

    1) SHORTCODE: The plugin author, Agent Evolution, has this post on their site about the plugin where they state this:

    [listings taxonomy=”status” term=”active” limit=”10″ columns=”3″]
    This will display all listings in the “Status” taxonomy, assigned to the “Active” term, limited to 10 listings, in 3 columns.

    So just change it to your taxonomy selections (e.g., commercial or residential) and its status, limit and number of columns.

    2) The other thing to do is even easier if you don’t need to wrap text around the listings, have a custom sidebar and stuff like that: Make a WP custom menu and link to your taxonomy items.

    Hope this helps.

    1) Go in to the plugins folder to “wp-listings > includes > views” and make a copy of “single-listing.php”.

    2) Move that single-listing.php in to your theme folder.

    3) Open it and remove this code and then save it. WP Listings will now use that template in your theme folder to pull up a single listing and it will be protected during the next upgrade:

    <div id="listing-contact" <?php if(!function_exists('aeprofiles_connected_agents_markup')) { echo 'style="width: 100%;"'; }; ?>>
    			<h4>Listing Inquiry</h4>
    			<?php
    			if (get_post_meta( $post->ID, '_listing_contact_form', true) != '') {
    
    				echo do_shortcode(get_post_meta( $post->ID, '_listing_contact_form', true) );
    
    			} else {
    
    				$nameError = '';
    				$emailError = '';
    
    				if(isset($_POST['submitted'])) {
    
    				$url = get_permalink();
    				$listing = get_the_title();
    
    				if(trim($_POST['contactName']) === '') {
    					$nameError = 'Please enter your name.';
    					$hasError = true;
    				} else {
    					$name = trim($_POST['contactName']);
    				}
    
    				if(trim($_POST['email']) === '')  {
    					$emailError = 'Please enter your email address.';
    					$hasError = true;
    				} else if (!preg_match("/^:alnum:[a-z0-9_.-]*@[a-z0-9.-]+\.[a-z]{2,4}$/i", trim($_POST['email']))) {
    					$emailError = 'You entered an invalid email address.';
    					$hasError = true;
    				} else {
    					$email = trim($_POST['email']);
    				}
    
    				$phone = trim($_POST['phone']);
    
    				if(function_exists('stripslashes')) {
    					$comments = stripslashes(trim($_POST['comments']));
    				} else {
    					$comments = trim($_POST['comments']);
    				}
    
    				if(isset($_POST['antispam']) && $_POST['antispam'] == '') {
    					if(!isset($hasError)) {
    						$emailTo = get_the_author_meta( 'user_email', $post->post_author );
    						if (!isset($emailTo) || ($emailTo == '') ){
    							$emailTo = get_option('admin_email');
    						}
    						$subject = 'Listing Inquiry from '.$name;
    						$body = "Name: $name \n\nEmail: $email \n\nPhone: $phone \n\nListing: $listing \n\nURL: $url \n\nComments: $comments";
    						$headers = 'From: '.$name.' <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email;
    
    						wp_mail($emailTo, $subject, $body, $headers);
    						$emailSent = true;
    					}
    				} else {
    					$emailSent = true; // make spammer think message went through
    				}
    
    			} ?>
    
    			<?php if(isset($emailSent) && $emailSent == true) {	?>
    				<div class="thanks">
    					<a name="redirectTo"></a>
    					<p>Thanks, your email was sent! We'll be in touch shortly.</p>
    				</div>
    			<?php } else { ?>
    				<?php if(isset($hasError)) { ?>
    					<a name="redirectTo"></a>
    					<label class="error" name="redirectTo">Sorry, an error occured. Please try again.<label>
    				<?php } ?>
    
    				<form action="<?php the_permalink(); ?>#redirectTo" id="inquiry-form" method="post">
    					<ul class="inquiry-form">
    						<li class="contactName">
    							<label for="contactName">Name: <span class="required">*</span></label>
    							<input type="text" name="contactName" id="contactName" value="<?php if(isset($_POST['contactName'])) echo $_POST['contactName'];?>" class="required requiredField" />
    							<?php if($nameError != '') { ?>
    								<label class="error"><?=$nameError;?></label>
    							<?php } ?>
    						</li>
    
    						<li class="contactEmail">
    							<label for="email">Email: <span class="required">*</span></label>
    							<input type="text" name="email" id="email" value="<?php if(isset($_POST['email']))  echo $_POST['email'];?>" class="required requiredField email" />
    							<?php if($emailError != '') { ?>
    								<label class="error"><?=$emailError;?></label>
    							<?php } ?>
    						</li>
    
    						<li class="contactPhone">
    							<label for="phone">Phone:</label>
    							<input type="text" name="phone" id="phone" value="<?php if(isset($_POST['phone']))  echo $_POST['phone'];?>" />
    						</li>
    
    						<li class="contactComments"><label for="commentsText">Message:</label>
    							<textarea name="comments" id="commentsText" rows="6" cols="20"><?php if(isset($_POST['comments'])) { if(function_exists('stripslashes')) { echo stripslashes($_POST['comments']); } else { echo $_POST['comments']; } } ?></textarea>
    						</li>
    
    						<li>
    							<input style="display: none;" type="text" name="antispam" />
    						</li>
    
    						<li>
    							<input id="submit" type="submit" value="Send Inquiry"></input>
    						</li>
    					</ul>
    					<input type="hidden" name="submitted" id="submitted" value="true" />
    				</form>
    			<?php }
    
    			}
    			?>
    		</div><!-- .listing-contact -->

    Hi rajshreeP — Just added a lengthy reply to rosshair which you might want to read here.

Viewing 15 replies - 16 through 30 (of 62 total)