I got this code:
<?php if( get_field('auch-interessant') ): ?>
<h4>Auch Interessant</h4>
<?php
$values = get_field('auch-interessant');
$title = get_the_title( $attachment_id );
if($values)
{
echo '<ul>';
foreach($values as $value) {
echo '<li><a href="' . $value . '">' . $title . '</a></li>';}
echo '</ul>';
}
?>
<?php endif; ?>
I got a list of page links.
But how can I get the page title of each link?
With following code:
echo '<li><a href="' . $value . '">' . $value . '</a></li>';}
I got:
<li><a href="http://www.google.de/lorem-ipsum-dolor-sit.php">http://www.google.de/lorem-ipsum-dolor-sit.php</a></li>
But I want to get this:
<li><a href="http://www.google.de/lorem-ipsum-dolor-sit.php">Lorem Ipsum Dolor sit</a></li>
Does anybody got an idea?
Thank your very much,
RaZz