WordPress
WordPress group
📝 17 Prompts
📚 Prompts in this Group
Learn these prompts step by step to master this theme
1
CSS body class
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="<?php bloginfo('charset'); ?>">
<?php wp_head(); ?>
<title>Free Energy Engine</title>
</head>
~<body <?php body_class(); ?>>~
<header class="site-header">
<div class="container">
<h1 class="school-logo-text float-left">
<a href="<?php echo site_url(); ?>"><strong>Free Energy</strong> Engine</a>
</h1>
<span class="js-search-trigger site-header__search-trigger"><i class="fa fa-search" aria-hidden="true"></i></span>
<i class="site-header__menu-trigger fa fa-bars" aria-hidden="true"></i>
<div class="site-header__menu group">
<nav class="main-navigation">
<ul>
<li><a href="<?php echo site_url('/about'); ?>">About</a></li>
<li><a href="<?php echo site_url('/cool-inventions'); ?>">Cool Inventions</a></li>
<li><a href="<?php echo site_url('/creativity'); ?>">Creativity</a></li>
<li><a href="<?php echo site_url('/inventions'); ?>">Inventions</a></li>
<li><a href="<?php echo site_url('/privacy-policy'); ?>">Privacy Policy</a></li>
</ul>
</nav>
<div class="site-header__util">
<a href="#" class="btn btn--small btn--orange float-left push-right">Login</a>
<a href="#" class="btn btn--small btn--dark-orange float-left">Sign Up</a>
<span class="search-trigger js-search-trigger"><i class="fa fa-search" aria-hidden="true"></i></span>
</div>
</div>
</div>
</header>
3
Function must you include just before the closing body tag in your WordPress to show admin bar?
<?php wp_footer(); ?>
7
GitHub Excluded Files
excluded from GitHub and included in the host section such as Hostinger or WordPress.com.
Reason enclosed with each item.
1. /wp-admin/ Why → WordPress core system
2. /wp-includes/ Why → WordPress core libraries
3. /wp-content/uploads/ Why → User-generated media
4. Vendor plugins Why → Third-party managed code
5. /wp-config.php Why → Secrets & environment config
6. Database Why → Dynamic runtime data
8
GitHub included files
GitHub included files :
1. /wp-content/themes/your-custom-theme/
2. /wp-content/plugins/your-custom-plugin/
3. /wp-content/mu-plugins/ (custom only)
4. Custom PHP / JS / CSS code you wrote
9
GitHub included files
GitHub included files :
1. /wp-content/themes/your-custom-theme/
2. /wp-content/plugins/your-custom-plugin/
3. /wp-content/mu-plugins/ (custom only)
4. Custom PHP / JS / CSS code you wrote
13
Mobile view Head
What meta tag should you place in the head section of an HTML document to make the page scale properly on mobile devices and match the screen width? in Page Header.php
<head>
~<meta name="viewport" content="width=device-width, initial-scale=1">~
<meta charset="<?php bloginfo('charset'); ?>">
<?php wp_head(); ?>
<title>Free Energy Engine</title>
</head>
17
What WordPress function returns the home page URL of your website?
<?php echo home_url(); ?>