Converting PHP code to shortcode help
-
Hi
I have spent a few days googling and trying to covert the following working php code to a shortcode so it doesn’t get lost when the other two users update a page with the visual editor.<?php $page_links = get_posts(array( 'category' => '25', 'post_type' => 'page', 'posts_per_page'=>-1, 'post_status' => 'publish', 'orderby' => 'title', 'order' => 'ASC' )); foreach($page_links as $link){ echo ' <li><a>ID).'">'.$link->post_title.'</a></li> '; } ?>I don’t think the issue is with the array but the output but as a cut and paste coder as its not my primary role its somewhat beyond me. If someone could point out what I am not getting that would be great
Thanks
Paul
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Converting PHP code to shortcode help’ is closed to new replies.