Issues working in custom theme
-
I need to be able to call this custom URL from within the theme.
`function get_top_news()
{
$category_id = 16; // news category id$new_args = array( ‘category’ => $category_id , ‘numberposts’ => 10,
);$myposts = get_posts( $new_args );
$output = ‘- ‘;
foreach ( $myposts as $new_post )
{
$description = strip_tags($new_post->post_content);$output .= ‘
- ‘.$new_post->post_title.’
‘;
}
$output .= ‘
‘;return $output;
}So, can you tell me (here) how I would get the custom URL for each post, since the data isn’t within the new_post variable?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Issues working in custom theme’ is closed to new replies.