shadabk92
Forum Replies Created
-
Thank you that template hierarchy was the document I was searching for.
Yes, I have been referring that documentation.
I need to know, like the themes such as twenty twelve, twenty thirteen, twenty fourteen; should I have to write and include separate comments.php,404.php etc, files in the package, or can I simply include the part of the code in the single.php or any other file where it will be executed?
For ex: Comments appear below a single post , therefore I have written the comments_template(); function in the single.php.
But in the themes like twenty twelve, twenty thirteen, twenty fourteen, there is a separate file for comments.php.
What practice should be followed, a separate comments.php or combined with single.php?
Forum: Themes and Templates
In reply to: Theme development with Bootstrap 3. Not able to link CSS and JS.Thanks, it worked.
I had also tried
<script src="<?php get_template_directory(); ?>/js/bootstrap.min.js"></script>
Why doesn’t this function get_template_directory(); work but get_template_directory_uri(); does?
Is it any update that is messing things around, or something else?
Forum: Themes and Templates
In reply to: Theme development with Bootstrap 3. Not able to link CSS and JS.No I am not using wp_enqueue_style().
This is the new modified header.php. But still the buttons,dropdowns and responsive dropdowns do not work.
HEADER
<!DOCTYPE html> <html> <head> <title> <?php wp_title(' | ', true, 'right'); ?> </title> <meta name="viewport" content="width=device-width, initial scale=1.0"> <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"> <?php wp_head(); ?> </head> <body> <div class="navbar navbar-inverse navbar-static-top"> <div class="container"> <a href="#" class="navbar-brand">Geek Site</a> <button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="collapse navbar-collapse navHeaderCollapse "> <ul class="nav navbar-nav navbar-right"> <li class="active"><a href="#">Home</a></li> <li><a href="#">Blog</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Social Media <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">Twitter</a></li> <li><a href="#">Facebook</a></li> <li><a href="#">Tumblr</a></li> <li><a href="#">Google+</a></li> </ul> </li> <li><a href="#">About</a></li> <li><a href="#contact" data-toggle="modal">Contact Us</a></li> </ul> </div> </div> </div> <div class="container">
I came across a tutorial which stated that, to enable the CSS and JS files linking into the index.php, I need to have this code below in header and footer respectively.
HEADER in the head tag
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
FOOTER in the tag that encloses the bootstrap js file
<script src="<?php get_template_directory_uri(); ?>js/bootstrap.min.js"></script>
Still the problem continues, but now the wordpress menubar is also appearing, it is fully functional but not the navbar in the site.
Can anyone suggest a solution to the issue.