WordPress.org

Forums

Hueman
[resolved] [closed] How to add slider to Home page if used a static page? (17 posts)

  1. wxa
    Member
    Posted 12 months ago #

    How to add slider with posts to Home page if used a static page?

    Thank you!

  2. YajYolid
    Member
    Posted 12 months ago #

    Hi wxa,

    When I used meteor slideshow plugin and add it only on the hompepage I used this code on the header.php file

    <?php if ( is_front_page() ) {

    if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); }

    } ?>

  3. wxa
    Member
    Posted 12 months ago #

    Hello Jay,

    I think that in Hueman the default Posts Slider is using Flex slider.

    Thank you! I will try it now.

  4. wxa
    Member
    Posted 12 months ago #

    This is not working. I want to show the default posts slider of the theme in frontpage (static page) and add also some other content with a page builder plugin that i have: visual composer.

    I need some help from the author, if possible, please.

    Thank you!

  5. wxa
    Member
    Posted 12 months ago #

    I am the only one that wants a static page on frontpage? :)

    Could i get please a little help adding the default posts slider of the theme in the frontpage using a static page?

    Thank you!

  6. noaneo
    Member
    Posted 12 months ago #

    hi,

    just put in template page.
    <?php get_template_part('inc/featured'); ?>

  7. Alexander Agnarson
    Member
    Theme Author

    Posted 12 months ago #

    Hi there, so first you would need to edit /inc/featured.php and remove the following from it:

    is_home() &&

    (On two locations)

    Then, go to /page-templates/child-menu.php and copy that file. Name it something new and change the header of the page template to your new template name.

    Then, inside of this new file, add:

    <?php get_template_part('inc/featured'); ?>

    Right below where it says:

    <div class="pad group">

    And then select your newly created page template as template for the static frontpage.

    These changes would be done with a child theme.

  8. wxa
    Member
    Posted 12 months ago #

    I just love you Alexander! :) That works like a charm with the child theme. You've just made one random act of kindness today! i will try to make that also! I will definitely support you work on PayPal.

    Thank you!

  9. Alexander Agnarson
    Member
    Theme Author

    Posted 12 months ago #

    i will try to make that also!

    :D

    Thank you.

  10. joecool1972
    Member
    Posted 7 months ago #

    Hi Alex,

    Sorry to tag on to this, but I have followed the instructions and it works, the only problem I have is that the slider loads after the bottom part. So when someone first comes to the site they will see the text at the bottom for a split second then the slider appears. I am trying to create a professional website so this doesn't look great.

    Any ideas how I would solve this?

  11. joecool1972
    Member
    Posted 7 months ago #

    Hi All,

    I am still trying to figure this out - Help...

    I have looked over the Alex's instructions again and I don't know if I have done this part properly:

    "...change the header of the page template to your new template name."

    I am not sure if I am doing the right thing.

    I have copied the child menu renamed it to "Changed Child Menu" and uploaded, but I wasn't sure where to "change the header of the page template to the new template name".

    Is it in the page.php file or in my new changed-child-menu file? or somewhere else. I have copied and pasted the entire contents of my change child menu file, if someone can tell me where to put the new template name in the template header. Where's the header to put the name in???

    Below is the entire contents:

    <?php/*Template Name: Changed Child Menu*/?><?php get_header(); ?><section class="content"> <?php get_template_part('inc/page-title'); ?> <div class="pad group"><?php get_template_part('inc/featured'); ?> <?php while ( have_posts() ): the_post(); ?> <article <?php post_class('group'); ?>> <?php get_template_part('inc/page-image'); ?> <div class="entry"> <?php the_content(); ?> <div class="clear"></div> </div><!--/.entry--> </article> <?php if ( ot_get_option('page-comments') == 'on' ) { comments_template('/comments.php',true); } ?> <?php endwhile; ?> </div><!--/.pad--> </section><!--/.content--><?php get_sidebar(); ?><?php get_footer(); ?>

  12. siyaad
    Member
    Posted 4 months ago #

    i dont know. i still have same problem, we need help gusy.

  13. joecool1972
    Member
    Posted 4 months ago #

    Hey Siyaad,

    The problem I had with the slider loading after the rest of he page I think is something I am just going to have to live with someone told me it's becuase it's images, I checked ou the demo page for the theme and other peoples sites and they all seem to be the same.

    In regards to the slider being added to the static page in general that works perfectly for me. Is that what you are having a problem with?

  14. noaneo
    Member
    Posted 4 months ago #

    hi,

    -create a page template. (name example home page)
    -in put the code of the slider
    <?php get_template_part('inc/featured'); ?>

    -do not forget to indicate in
    is_home() &
    the name of your page or the ID

    the example of joecool1972 is good.

    <?php/*Template Name: Changed Child Menu*/?>
    <?php get_header(); ?>
    <section class="content">
    <?php get_template_part('inc/page-title'); ?>
    <div class="pad group">
    <?php get_template_part('inc/featured'); ?>
    <?php while ( have_posts() ): the_post(); ?>
    <article <?php post_class('group'); ?>>
    <?php get_template_part('inc/page-image'); ?>
    <div class="entry">
    <?php the_content(); ?>
    <div class="clear">
    </div> </div>
    <!--/.entry--> </article>
    <?php if ( ot_get_option('page-comments') == 'on' ) { comments_template('/comments.php',true); } ?>
    <?php endwhile; ?> </div><!--/.pad--> </section>
    <!--/.content-->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  15. siyaad
    Member
    Posted 4 months ago #

    thank you very much, although iam not familiar with creating a template and messing around with it, what i would want is having slider with article in my homepage and when someone clicks they will go to post page please,

    explain in details, and please visit my website here.

    do have to to user meteor slider or what. my homepage name is Welcome and Post page is News, please help me thank you.. noaneo

  16. siyaad
    Member
    Posted 4 months ago #

    hey guys Anyone please,

    i just need to add slider with article in homepage and when someone clicks it

    goes to post page, simply i couldn't figure out the correct steps and i dont

    want to mess up everything you know, joecool1972 and noaneo

    i really need your help guys, please guys

  17. Andrew
    Forum moderator
    Posted 4 months ago #

    You can create your own thread to discuss your own issues, just as you did 1 day ago.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic