• Resolved danimartinez

    (@danimartinez)


    Hello,

    My situation is: I have a single theme for a bunch of blogs inside a network, they all use same theme and I want to load metaslider on header.php, but each blog has a unique slider.

    If I modify header.php to load slider with a single ID, it will not work. Anybody knows a way I can handle this situation?

    https://ww.wp.xz.cn/plugins/ml-slider/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    Would you be able to post the code you are using so we can take a look?

    Thanks,
    Dave

    Thread Starter danimartinez

    (@danimartinez)

    Hi Dave,

    <header id="masthead" class="site-header row" role="banner">
    			<div class="row">
    				<?php
                        echo do_shortcode("[metaslider id=4881]"); // replace 123 with your slideshow ID
                    ?>
    			</div>
    			<div id="site-navigation-bar" class="row">

    This is what we have inside header.php of our theme. But we have the same theme for a lot of blogs inside a network.

    The problem is, for every blog, when we create a new slider, metaslider assigns a new id. Then, the code below is useless.

    Any ideas? is there a way we can show metaslider but not using it’s unique ID?

    Hi there,

    I’m not sure if there is a solution for your issue sorry.

    Have you created a slider for each of the blogs? You could put in some conditional code that will switch between the different IDs but you will still need to know about the IDs so this is probably not useful.

    Meta Slider needs to know which slider to use – it could be that you could create some code that will display the first slider it can find – would this be useful?

    Thanks,
    Dave

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘metaslider shortcode without id?’ is closed to new replies.