• Resolved mehrdads

    (@mehrdads)


    Hi
    Previously I used of this guide link to show slider in my static homepage, but in version 3.1 its not display. This Error display in my Chrome’s Inspect:
    Uncaught TypeError: jQuery(...).flexslider is not a function
    This means:

    jQuery('#flexslider-featured').flexslider({
    						animation: "slide",
    						useCSS: false, // Fix iPad flickering issue
    						directionNav: true,
    						controlNav: true,
    						pauseOnHover: true,
    						animationSpeed: 400,
    						smoothHeight: true,
    						touch: false,
    						slideshow: true,
    						slideshowSpeed: 6000,
    					});

    My site is on the localhost.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi mehrdads. If you have this in your static page template:

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

    The location of featured.php has changed:

    <?php get_template_part('parts/featured'); ?>
    Thread Starter mehrdads

    (@mehrdads)

    Hi Mr.bdbrown,
    Yes, i changed it but the problem is not resolved.

    Can you post a link to your site? Thanks.

    Thread Starter mehrdads

    (@mehrdads)

    Dear bdbrown
    My site is on the localhost.
    Excuse me , do you can test this ?!

    Thread Starter mehrdads

    (@mehrdads)

    I found my problem.
    There is is_home() && in this address >>>
    functions folder > init-front.php > line 429 >
    if ( has_post_format( 'gallery' ) || ( is_home() && ! is_paged() && ( hu_get_option('featured-posts-count') != '0' ) ) ) {
    I remove is_home() && and my slider worked.
    Now, what to do with this ?

    Since you have a static front page you needed to remove the is_home() argument in featured.php for it to work, since is_home() returns True only on the site blog page. This worked because prior to v3 the jQuery script used to create the featured posts slider was loaded on every page. This was so it was available if needed; however, on most pages it wasn’t used. Now, in v3, the jQuery script is only loaded on pages where it would be needed, thereby reducing page load time for the majority of pages. That’s why the hu_scripts function contains the is_home() argument.
    To preserve the new functionality I would recommend:
    1. Copy the new version of featured.php into a /parts directory in your child theme. In that file change the is_home() argument to is_front_page(). Then you can remove the featured.php file in your child theme /inc folder.
    2. Copy the entire hu_scripts() function into your child theme functions.php file, then change the is_home() argument to is_front_page().

    Thread Starter mehrdads

    (@mehrdads)

    Thanks for your tips.
    Your guidance worked correctly.
    I know you’re busy, so forgive me for asking lots of questions.
    Thank you Mr.Brown.

    Hi bdbrown,

    No more slider for me also.

    I try to apply our recommendations.

    But where can I found the hu_scripts()?

    As you say in point 2.

    Thanks

    Hi again,

    Sorry to disturb you.

    It’s OK now. I found it in functions/init-front.php.

    It seems to work now.

    Thread Starter mehrdads

    (@mehrdads)

    No problem.
    Have good time.

    @mehrdads wrote:

    I know you’re busy, so forgive me for asking lots of questions.

    No apology needed; that’s why we have these forums. Glad to help.

    Thread Starter mehrdads

    (@mehrdads)

    I`m sorry Mr.Brown.
    I don’t know how to tell you !
    Please help. link
    I tried to help him but I was not.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Error in show slider in static homepage’ is closed to new replies.