creating links
-
Hey!
I wan’t to make links with Types.
I solved it with to ‘single line’ filed, like: ‘Title for links’, and ‘URL for links’. I wan’t to allow multiple instances.
My problem is that, i don’t get in the same order the ‘titles’, as the ‘URL’-s.
Any suggestion, how to solve it?<?php $link_texts = get_post_meta($post->ID,'wpcf-link_texts'); $link_urls = get_post_meta($post->ID,'wpcf-link_urls'); if ( count($link_urls) == count($link_texts) ){ for($i = 0, $size = count($link_urls); $i <= $size; ++$i) { echo '<li><a href="' . $link_urls[$i] . '" target="_blank">' . $link_texts_ru[$i] .' </a></li>'; } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘creating links’ is closed to new replies.