Add this constant to your wp-config.php file to disable plugin and theme updates/installation:
define('DISALLOW_FILE_MODS',true);
define('DISALLOW_FILE_MODS',true);
function get_id_by_post_name($post_name)
{
global $wpdb;
$id = $wpdb->get_var("SELECT ID FROM $wpdb->posts WHERE post_name = '".$post_name."' AND post_status='publish'");
return $id;
}
/wp-content/themes/default
” where “default
” is your theme name.cover_page.php
” and add the following code to it:
<?php /* Template Name: Cover Page */ ?>
<?php get_header(); ?>
Here's my cover page!
<?php get_footer(); ?>
<?php if (is_page_template('
cover_page.php
') )
{ ?> <p>Apples</p> <?php }
else { ?> <p>Oranges</p> <?php } ?>