Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter kdn

    (@kdn)

    Thanks a lot again.

    I did it with a simple foreach loop since the project only require output from one subpage.

    $i = 0;
    foreach ($my_subpagelist as $key => $value) {
    		$i++; 
    
    		if ( $i == 1 )
    		break;
    		}
    		$subpageID = $key;

    Thread Starter kdn

    (@kdn)

    Sorry for the noob questions here but Im not a PHP guru.

    I get the correct array output from esmi’s code above but how do I access it?

    The array looks like this

    Array (
    [55] => stdClass Object (
    [ID] => 55
    [post_author] => 2
    [post_date] => 2009-11-03 21:43:33
    [post_date_gmt] => 2009-11-03 20:43:33
    [post_content] => Postcontent.
    [post_title] => subpage1
    [post_excerpt] =>
    [post_status] => publish
    [comment_status] => open
    [ping_status] => open
    [post_password] =>
    [post_name] => pris
    [to_ping] =>
    [pinged] =>
    [post_modified] => 2009-11-03 21:43:33
    [post_modified_gmt] => 2009-11-03 20:43:33
    [post_content_filtered] =>
    [post_parent] => 30
    [guid] => https://custome.url/page/
    [menu_order] => 0
    [post_type] => page
    [post_mime_type] =>
    [comment_count] => 0 
    
    )
    [59] => stdClass Object (
    [ID] => 59 [post_author] => 2
    [post_date] => 2009-11-04 02:51:38
    [post_date_gmt] => 2009-11-04 01:51:38
    [post_content] => postcontent.
    [post_title] => subpage2
    [post_excerpt] =>
    [post_status] => publish
    [comment_status] => open
    [ping_status] => open
    [post_password] =>
    [post_name] => subpage2
    [to_ping] =>
    [pinged] =>
    [post_modified] => 2009-11-04 02:51:38
    [post_modified_gmt] => 2009-11-04 01:51:38
    [post_content_filtered] =>
    [post_parent] => 30
    [guid] => https://custome.url/page/
    [menu_order] => 0
    [post_type] => page
    [post_mime_type] =>
    [comment_count] => 0 )
    
    )

    The initial array name change for each subpage.

    How do I parse out only the ID data? And what if there is multiple entries?

    Thread Starter kdn

    (@kdn)

    Thanks, that was the bit I were missing.

    Im currently working on a theme that include the output from your character plugin on the author pages.

    How do I parse the [wowcd character=”<?php echo $author_name; ?>”] directly in the theme? Do I use the function itself?

Viewing 4 replies - 1 through 4 (of 4 total)