Custom Page template issue
-
I downloaded and added a custom page template, but when I added a plugin to the template, the plugin was not displaying and working properly. When I added the get-header()and get-footer() function to the php file of the template, the custom page displayed all the menus, colors, etc. to the page and the background color was changed from blue to the yellow color of the default template,which I didn’t wanted.
I then added the following code to the functions.php file:function mypage_head() { echo '<link rel="stylesheet" type="text/css" href="'.get_bloginfo('template_directory').'/OldSkool-src/style.css">'."\n"; } add_action('wp_head', 'mypage_head');
I also added the following code to the custom page template’s php file before </head>:
<?php add_action( 'wp_print_styles', 'mypage_head', 11 ); ?> <?php wp_head(); ?>
This resulted in the rendering of the correct custom page with the plugin working, although not fully, but my other pages were completely messed up.My other pages were rendering the CSS of both the default and the custom template.
Please help me to resolve this so that the custom page is rendered correctly, the plugin works correctly and the other pages are rendereed correctly.
I am new to wordpress, php and CSS, so kindly bear with me.
Thanks in advance.
- The topic ‘Custom Page template issue’ is closed to new replies.