• Resolved cybercli

    (@cybercli)


    I have this code to create a blank page template which works ok but the content is not mobile responsive. Is there a way to do so by modifying this code?

    <?php
    /**
    	Template Name: Blank Page
    
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    <title><?php wp_title( '|', true, 'right' ); bloginfo('url'); ?></title>
    <?php wp_head(); ?>
    </head>
    
    <body>
    <?php while (have_posts()) : the_post(); ?>
    <div id="page-content">
    	<?php the_content(); endwhile; ?>
    </div>
    </body>
    </html>

    Do I need to insert a link to the CSS file of my theme?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • If you don’t want to add CSS of your theme, you can simply try to put the following line under <head> section and it should do the trick.

    <meta name="viewport" content="width=device-width, initial-scale=1">

    Here is a full code:
    ——————

    <?php
    /**
    	Template Name: Blank Page
    
    */
    ?>
    <html>
    <head>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <title><?php wp_title( '|', true, 'right' ); bloginfo('url'); ?></title>
    <?php wp_head(); ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    </head>
    
    <body>
    <?php while (have_posts()) : the_post(); ?>
    <div id="page-content">
    	<?php the_content(); endwhile; ?>
    </div>
    </body>
    </html>

    Thread Starter cybercli

    (@cybercli)

    Wow!! I didn’t know it could be so simple!
    Thank you so much Dipak! It works perfectly!

    cybercli, I am glad that it worked.

    Could you mark this thread as ‘Resolved’ now?

    Thread Starter cybercli

    (@cybercli)

    Ooops, Thanks again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"RESPONSIVE" Blank Page Template’ is closed to new replies.