• Hello folks,

    i have to php sites in my wordpress theme the first is: work_template and the other single_work.php

    in the single_work.php is this code:

    <?php the_content(); ?>
    							<?php
    								$client = get_post_meta( get_the_ID(), 'work_client', true );
    								$client_url = get_post_meta( get_the_ID(), 'work_client_url', true )
    							 ?>
    							<?php if (!empty($client)){ ?>
    								<p class="client"><i class="fa fa-user"></i>Webseite: <a href="<?php echo esc_url($client_url); ?>"><?php echo esc_attr($client); ?></a></p>
    							<?php } ?>

    i want to display the client_url in my work_template there is this code:

    <div class="divider" style="background-color: <?php echo esc_attr(get_post_meta( get_the_ID(), 'work_color', true )); ?>"></div>
    				<?php
    					$excerpt = get_the_excerpt();
    				 	$pos = strpos( $excerpt, '<a');
    				 	if ($pos != false) {
    				 		$excerpt = substr($excerpt, 0, $pos);
    				 	}
    				?>
    				<p><?php echo wp_kses_post($excerpt); ?></p>
    				<div class="button"><i class="fa fa-eye"></i><?php _e('view','milk')  ?></div>

    has anybody an idea how i can get the client_work_url to: <div class="button"><i class="fa fa-eye"></i><?php _e('view','milk') ?></div>

    thanks
    Carsten

  • The topic ‘Client URL question’ is closed to new replies.