Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

jasonchu1 on "[Plugin: Polylang] Frontend strings translation"

$
0
0

Here is the code i use for the tabs. If it matters.

<div id="listing-tabs" class="listing-data">

			<ul>
				<li><a href="#listing-description">Description</a></li>

                <li><a href="#listing-my-sum">Amenities</a></li>

                <?php if (get_post_meta( $post->ID, '_listing_apartment', true) != '') { ?>
					<li><a href="#listing-apartment">Apartments</a></li>
				<?php } ?>

				<?php if (get_post_meta( $post->ID, '_listing_gallery', true) != '') { ?>
					<li><a href="#listing-gallery">Photos</a></li>
				<?php } ?>

                <?php if (get_post_meta( $post->ID, '_listing_local_amenities', true) != '') { ?>
					<li><a href="#listing-local-amenities">Local amenities</a></li>
                    <?php } ?>

				<?php if (get_post_meta( $post->ID, '_listing_enquire', true) != '') { ?>
				<li><a href="#listing-enquire">Enquire</a></li>
				<?php } ?>

			</ul>

			<div id="listing-description">

				<?php the_content( __( 'View more <span class="meta-nav">&rarr;</span>', 'wp_listings' ) ); ?>

			</div><!-- #listing-description -->

			<div id="listing-my-sum">

				<?php
					$details_instance = new WP_Listings();
					$pattern = '<tr class="wp_listings%s"><td class="label">%s</td><td>%s</td></tr>';

				if ( get_post_meta( $post->ID, '_listing_my_sum', true) != '' || get_post_meta( $post->ID, '_listing_kitchen_sum', true) != '' || get_post_meta( $post->ID, '_listing_living_room', true) != '' || get_post_meta( $post->ID, '_listing_master_suite', true) != '') { ?>

						<p class="value"><?php echo do_shortcode(get_post_meta( $post->ID, '_listing_my_sum', true)); ?></p>

				<?php
				} ?>

			</div><!-- #listing-details -->

			<?php if (get_post_meta( $post->ID, '_listing_gallery', true) != '') { ?>
			<div id="listing-gallery">
				<?php echo do_shortcode(get_post_meta( $post->ID, '_listing_gallery', true)); ?>

			</div><!-- #listing-gallery -->

			<?php } ?>

			<?php if (get_post_meta( $post->ID, '_listing_local_amenities', true) != '') { ?>

			<div id="listing-local-amenities">

				<div class="iframe-wrap">

				<?php echo get_post_meta( $post->ID, '_listing_local_amenities', true); ?>

				</div>

			</div><!-- #listing-local-amenities -->

			<?php } ?>

			<?php if (get_post_meta( $post->ID, '_listing_apartment', true) != '') { ?>

			<div id="listing-apartment">

				<p>

				<?php echo do_shortcode(get_post_meta( $post->ID, '_listing_apartment', true)); ?>

				</p>

			</div><!-- #listing-apartment -->

			<?php } ?>

			<?php if (get_post_meta( $post->ID, '_listing_enquire', true) != '') { ?>

			<div id="listing-enquire">

				<p>

				<?php echo do_shortcode(get_post_meta( $post->ID, '_listing_enquire', true)); ?>
				</p>

			</div><!-- #listing-enquire -->

			<?php } ?>

		</div><!-- #listing-tabs.listing-data -->

		<?php

			if (get_post_meta( $post->ID, '_listing_map', true) != '') {

			echo '<div id="listing-map"><h3>Location Map</h3>';

			echo do_shortcode(get_post_meta( $post->ID, '_listing_map', true) );

			echo '</div><!-- .listing-map -->';

			}

		?>

Thanks!!


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>