Wordpress: Custom shortcode to accomplish this?

Discussion in 'PHP' started by Josh-H, Sep 7, 2012.

  1. #1
    Hey guys, I'm just wondering if someone could give me some helpful hints as to how to accomplish this, maybe even tell me what I should be searching for, as at the moment I'm not so sure!

    Basically, I want to have two content area sliders on my homepage, that are populated by a Wordpress page in this manner.

    [area 1]
    [item]An image[/item] [item]An image[/item] [item]An image[/item] [item]An image[/item]
    [/area 1]

    [area 2]
    [item]An image[/item] [item]An image[/item] [item]An image[/item] [item]An image[/item]
    [/area 2]

    So then the php code for the sliders loads the wordpress page, strips out the unnecessary stuff from get_the_content() and adds the items for that area into an array so I can use them in the slider. I can do the javascript for the slider, just don't know how to setup the parsing of the post to get the correct content in the first place!

    Thanks!
     
    Josh-H, Sep 7, 2012 IP