Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member lew1s's Avatar
    Join Date
    Oct 2013
    Posts
    65
    Member #
    37371
    Liked
    2 times

    one page slider wordpress

    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();
    ?>

  2.  

  3. #2
    Member
    Join Date
    Sep 2011
    Location
    Vancouver,Canada
    Posts
    88
    Member #
    29393
    Liked
    2 times
    So are you using a plugin for the slider or you made your own??
    If you are using a plugin slider, just add the php shortcode on the theme where you want to show it..Make sure to a div id or class on it..

    Then on the css, just set it to display none on all pages except for the one page you want to show..

    Cheers

  4. #3
    Member lew1s's Avatar
    Join Date
    Oct 2013
    Posts
    65
    Member #
    37371
    Liked
    2 times
    dont understand what you mean and if you understand my issue. i mean when i add on any page any shortcode like [gallery id=2] it doesnt take it. it shows on front-end just [gallery id=2]


    Quote Originally Posted by juanDesign View Post
    So are you using a plugin for the slider or you made your own??
    If you are using a plugin slider, just add the php shortcode on the theme where you want to show it..Make sure to a div id or class on it..

    Then on the css, just set it to display none on all pages except for the one page you want to show..

    Cheers

  5. #4
    Member
    Join Date
    Sep 2011
    Location
    Vancouver,Canada
    Posts
    88
    Member #
    29393
    Liked
    2 times
    Quote Originally Posted by lew1s View Post
    dont understand what you mean and if you understand my issue. i mean when i add on any page any shortcode like [gallery id=2] it doesnt take it. it shows on front-end just [gallery id=2]
    Hi,ofcourse it will only show the shortcode, cause you added it on the theme file,If you add it on theme file you have to add a php shortcode..i.e like this <? php echo do 'shortcode here' ?>...What plugin are you using??

    Shortcode without php can be just added on the page or posts but not in theme file..


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 10:01 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com