• Resolved rmhfw

    (@rmhfw)


    My MetaSlider is not working on new pages I create within my website. I have not added any new plugins, nor have I updated my theme since I last created a page in December. I have two new pages where the MetaSlider doesn’t work. Anyone else have that problem?

    Each page has a horizontal metaslider at the top of the page – those are the ones not showing.

    An additional page is https://www.rmhfw.org/earthday

    I need to create another new page for an event and need the metaslider to work.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @rmhfw,

    It looks like that shortcode doesn’t exist anymore. I see a message MetaSlider 8809 not found. Can you double check the slideshow shortcode i correct?

    Thread Starter rmhfw

    (@rmhfw)

    With my template, the shortcodes are embedded into the design. This is a custom wordpress template and I don’t go into the backend. So the metaslider 8809 does exist, but I cannot see where you are seeing that it doesn’t exist.

    Hi, I’m seeing the error in the HTML as a comment. You might have to log into the backend and change that slideshow ID to a different one.

    Thread Starter rmhfw

    (@rmhfw)

    This is not the only slider that is not working. On all my old pages, they work fine, but with any new pages created they do not show. So how will changing the slideshow ID correct all my new pages?

    Hi,

    The way to debug is to start small and rule out the obvious before trying more complex ideas. If that doesn’t work, or if you get a new error, then I can suggest something new.

    Can you create a new slideshow and replace it on either of the two pages linked above?

    Can you also tell me a page where it works?

    Thanks

    Thread Starter rmhfw

    (@rmhfw)

    I created a new slider and replaced it on https://www.rmhfw.org/rsszynathon and the top slider still doesn’t work.

    One every other page except the one above and https://www.rmhfw.org/earthday, the slider works, so go to https://www.rmhfw.org to see.

    One more thing you might want to try before reading the info below. Take a slideshow that is definitely working (7) and switch it with one that doesnt.

    By the way, how many slideshows do you have?

    Here’s how that part of the code works:

    if (!$slider || $slider->post_status != 'publish' || $slider->post_type != 'ml-slider') {
      return "<!-- MetaSlider {$atts['id']} not found -->";
    }

    Thats the error code I’m seeing.

    We know $atts['id'] is set because I can see its 8852.

    So this means that $slider, which uses get_post(8852) is null, or false

    OR it’s not false and it’s set to draft, or pending, or something,

    OR, somehow the post_type (‘ml-slider’) is being changed.

    (I might not be online to reply until tomorrow)

    Thread Starter rmhfw

    (@rmhfw)

    I have 41 sliders. I also switched a slider that does work with one that doesn’t and the new page slider still does not work. It has to do with NEW pages only, not ones created before March 1.

    Hi @rmhfw,

    Are you experienced with any coding?

    Are you able to edit the functions.php file? Only do this by FTP in case something goes wrong and you can no longer access the WP admin area. It should be fine, and easy to remove, but just to be safe.

    Only add this if you know what you’re doing and are willing to disable the 404 page temporarily

    if (is_404()) {
      wp_die(get_post(8894));
    }

    This will just print out the info about the slideshow and die() on 404 pages only.

    Then navigate to any 404 page on your site and see the output from that slideshow.

    Copy the output and paste it https://pastebin.com/ and share the link here. We’re looking for the post_type to be ‘ml-slider’ and the post_status to be ‘publish’.

    If you’re not comfortable with that (that’s okay!), do you have access to your database or phpmyadmin? We can also check there.

    Hi @rmhfw,

    I’m going to mark this as resolved as we didn’t hear back, but please feel free to comment or open a new issue if needed, thanks!

    Hey, I came across this post because I was having (I assume) the exact same issue. I also happen to be using the same custom theme (hi Fort Worth, Arkoma chapter here!). I just figured out what was for me the issue. For some reason, the MetaSlider page is showing this:

    How to Use
    To display your slideshow, add the following shortcode (in orange) to your page. If adding the slideshow to your theme files, additionally include the surrounding PHP function (in gray).
    
    <?php echo do_shortcode('
    ??[metaslider id="7656"]
    '); ?>

    However, the actual Metaslider shortcode should be this:
    [metaslider id=7656]

    So you can’t just copy it and paste it over, you have to remove those quotation marks. Don’t know when this started happening but I’m glad it was an easy if not mildly annoying fix.

    Hi @rmhcofarkoma,

    Quotes shouldn’t matter in shortcodes. Take a look at the examples in the WordPress documentation. What happens when you keep the quotes?

    https://codex.www.ads-software.com/shortcode

    Also, what about if you click the shortcode in the “How to use” section instead of copy/paste? Maybe it’s an issue with the font?

    I did use the click feature rather than copy/pasting. I also tried replacing/retyping the quote marks manually in case it was a font issue.

    When I keep the quotes, the slide doesn’t show up on the page at all, and the ‘metaslider not found’ error is found in the code. When I removed the quotes (on two separate pages, where the same error was happening, with any slideshow I tried), the sliders worked as expected. So it may not be the quotes but for some reason that worked?

    Hi @rmhcofarkoma,

    Hmm not sure. We have lots of users using the quotes, and all of my test sites also include them. I bet there’s a plugin or maybe a function in your theme that is altering it somehow.

    Can you try single quotes? [metaslider id=’7656′]

    Do other shortcodes work with double quotes?

    Do you have a lot of plugins? Any that alter the_content or alter text in some way?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Sliders not working with new pages’ is closed to new replies.