Support » Plugin: Advanced Post List » PHP_Function Shortcode – Item_Number

  • Resolved signale


    Hey, is there a way to get the post number in the loop when using PHP_Function Shortcode

    I tried to pass the param from the APL screen – it passes the string, though when returns it displays correctly, but when in the php mode – it interprets as a string


    The page I need help with: [log in to see the link]

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


    Dah, used the global variable, sorry for the disturbing

    Plugin Author Advanced Post List


    Yea, WP Shortcodes only pass string params.

    PHP does provide a few methods for converting a string to an integer. Function intval is one of the more common ones.



    Tried one, doesn’t work. It sees the value as a string(‘[item_number]’), converts it if you return it though, for exampke I did return $return .= $item_number.’Line’; and it actually displays as a number, but inside the custom function doesn’t work

    Plugin Author EkoJR


    That PHP function should convert the string to an int.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP_Function Shortcode – Item_Number’ is closed to new replies.