Premium WordPress Themes and Support

 

 

I had this post prepared yesterday and ready to go but did not publish it because the first 700 words of this post was very negative, and totally trashing the developer’s of Artisteer. My fever was back again yesterday, so I was probably more irritable and combustible than usual. After a good night of sleep, I decided to leave all my strong feelings out, and let you decide how amateurish things are at Artisteer and Themler.

Anyway, let me start with the real purpose of this post – Part 1 will be dealing with a common issue found in some paid artx files, and Part 2 will show you how to insert sliders in themes like a pro.

Below is the code discussed in the second video. What was left out was that in order to continue with the professional theme development discussion, the sliders and all plugins in general should be installed and automatically activated by using the TGM plugin activation class – which will be the topic of the next post…

 

Part 1 Video

Part 2 Video

 

——————————————————————————————

<?php include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); ?>

<div class=”qsslider”>

<?php
If (is_plugin_active(‘responsive-slider/responsive-slider.php’)) {
if (is_front_page()) {
echo do_shortcode( ‘[responsive_slider]’ );
}
}

If (is_plugin_active(‘slider-wd/slider-wd.php’)) {
if (is_front_page()) {
wd_slider(1);
}
}
?>

</div>

——————————————————————————————-

 

This code checks if either the “responsive slider” or the “wd slider” plugins are activated, and if they are, display them only on the front page (not  home page, although by default the home page is also the front page – confused yet?). Finally the sliders code is wrapped with a div statement with a custom class, so you can easily style and control the sliders in one go. For instance, if you don’t want the slider on mobile devices you can use this:

 

.responsive .qsslider {

display: none;

}

 

It’s unforgettable to be selling artx files with such visible issues, or then again, may be I’m too harsh, attention to detail and perfection is not all that important! I’ll let you decide…


UPDATE: JULY 24, 2016.

With Quicker Themes 1.1 scheduled to be released on Aug. 20, 2016, there will be a third slider recommended by the TGM plugin installer. I also suggest to use a wptc-  prefix for the sliders custm CSS class. The new suggested code should be now:

<?php include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); ?>

<div class=”wptc-slider”>

<?php
If (is_plugin_active(‘responsive-slider/responsive-slider.php’)) {
if (is_front_page()) {
echo do_shortcode( ‘[responsive_slider]’ );
}
}

If (is_plugin_active(‘slider-wd/slider-wd.php’)) {
if (is_front_page()) {
wd_slider(1);
}
}

If (is_plugin_active(‘post-slider-wd/post-slider-wd.php’)) {
if (is_front_page()) {
wdp_slider(1);
}
}
?>

</div>

 


 

Also, there will be instances where you want to display the slider on the homepage and hide the header at the same time. The following code will do just that.

<?php include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ ); ?>

<div class=”wptc-slider”>

<?php
If (is_plugin_active(‘responsive-slider/responsive-slider.php’)) {
if (is_front_page()) { ?>
<style type=”text/css”>
body.home .art-header {
display:none;
}
</style>
<?php echo do_shortcode( ‘[responsive_slider]’ );
}
}

If (is_plugin_active(‘slider-wd/slider-wd.php’)) {
if (is_front_page()) { ?>
<style type=”text/css”>
body.home .art-header {
display:none;
}
</style>
<?php wd_slider(1);
}
}

If (is_plugin_active(‘post-slider-wd/post-slider-wd.php’)) {
if (is_front_page()) { ?>
<style type=”text/css”>
body.home .art-header {
display:none;
}
</style>
<?php wdp_slider(1);
}
}
?>

</div>

 

 

 

3 comments on “Fixing certain theme issues and inserting sliders like a pro

Avatar image
su on March 1, 2016 3:17 pm

Yeah we have video with sound, thanks Nikc….

Avatar image
su on March 1, 2016 4:29 pm

Nick, i got that issue alot…. the reaseon i used they artx files because can speedup my work… but, yes they do some mostake there. As specialy for full page header design, i have to take alook my full page design. Before watch your video iam not aware about that issue.

Thanks Nick, Can you put you css code here nick for responisve navigation or header.

Avatar image
Nick on March 1, 2016 5:22 pm

Here you go: Because it was only 2 lines, and it was shown in the video, I did not think of posting it.

.responsive .art-nav {
background: #17A8FB;
}

Leave a Reply