WordPress - Minimal theme
⚠️ This article was created for developers!
To be able to follow the steps, you're required to have coding knowledge. If you're not a developer and can't achieve what you're looking for, consider hiring a developer.
Make sure to carefully follow the tutorial and write correct code. We're unable to provide help with custom coding, or the possible issues that are happening because of them.
In this article
Minimal theme
Some people only want to build their website from one slider. You could use this theme for it, because it's optimized, and won't load anything else, just a slider (if you don't have other plugins).
Go to your ftp, to the wp-content/themes folder and create a folder, which will be the name of your theme.
Create an index.php file with this code in it, just replace the slider's shortcode with yours:
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo("charset"); ?>"> <meta name="viewport" content="width=device-width"> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo("pingback_url"); ?>"> <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css"> <?php wp_head(); ?> </head> <body> <div id="container"> <?php echo do_shortcode("[smartslider3 slider='1']"); ?> </div> <?php wp_footer(); ?> </body> </html>
Then create a style.css file, and put this code in it:
/* Theme Name: minimal nextend Theme URI: minimal nextend Text Domain: minimal-nextend */ html, body{ margin:0; padding:0; } #container{ width:100%; }
Now you can activate this theme from your backend.
If you would like to use more pages each containing a shortcode of a different slide, you could create an index.php file like this:
<!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo("charset"); ?>"> <meta name="viewport" content="width=device-width"> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo("pingback_url"); ?>"> <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css"> <?php wp_head(); ?> </head> <body> <div id="container"> <?php while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile;?> </div> <?php wp_footer(); ?> </body> </html>
Minimal page template
Create a page template based on this WordPress tutorial, and put this content to the created PHP file:
<?php /** * Template Name: Minimal */ ?> <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset="<?php bloginfo("charset"); ?>"> <meta name="viewport" content="width=device-width"> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo("pingback_url"); ?>"> <link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css"> <?php wp_head(); ?> </head> <body> <div id="container"> <?php while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile;?> </div> <?php wp_footer(); ?> </body> </html>
wp_head()
and the
wp_footer()
functions which most other plugins use to add their CSS and JS files to your page. So you can remove these lines to remove most other plugin's files from the page.
Creating a landing page
If you are using WordPress and you want your homepage to be just something you made out of our slider, and then your other pages should be as they were, then you should create a minimal theme, then check out one of these articles to see, how you can use different themes on your different pages, so you would be able to use this new theme on your homepage, while your other pages would use the original theme: