1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

one page slider wordpress

Discussion in 'Content Management' started by lew1s666, May 20, 2014.

  1. #1
    Hi,

    I am using roots theme with and I implemented one page slider in to it. so this is my front page now -(see the code)
    - the problem is that when i insert some shortcode in page or post doesnt working. Just shows me the shortcode from front-end.




    <div id="container">
    <a name="top"></a>
    <?php
    $args = array(
    'sort_order' => 'ASC',
    'sort_column' => 'menu_order', //post_title
    'hierarchical' => 1,
    'exclude' => '',
    'child_of' => 0,
    'parent' => -1,
    'exclude_tree' => '',
    'number' => '',
    'offset' => 0,
    'post_type' => 'page',
    'post_status' => 'publish'
    );
    $pages = get_pages($args);
    //start loop
    foreach ($pages as $page_data) {
    $content = apply_filters('the_content', $page_data->post_content);
    $title = $page_data->post_title;
    $slug = $page_data->post_name;
    ?>
    <div class='<?php echo "$slug" ?>'><a name='<?php echo "$slug" ?>'></a>

    <?php echo "$content" ?>
    </div>




    <?php
    }
    get_footer();
    ?>
     
    lew1s666, May 20, 2014 IP