Hot answers tagged

6

Include CSS and JavaScipt in the functions.php. Create an empty PHP file, call it header.php, and yes wp_head() goes just before </head> not before <body> tag. <!DOCTYPE html> <html> <head> <title>Website</title> <link href="style.css" rel="stylesheet" type="text/css" /> <?php wp_head(); ?> ...


5

If I am understanding you have a taxonomy that is shared across multiple post types? And you want to make a custom template for each post type using the Wordpress's templating system. Which isn't possible. What you could do is add conditionals to your taxonomy-disrupt-categories.php to check what the current post type is and load different template parts ...


2

Don't include CSS and JavaScript manually, there are special functions for this purpose. Modify this code to meet your requirements and put it to the functions.php of your theme. <?php $template_file_name = basename( get_page_template() ); // get template file name if('my_template.php' == $template_file_name) { // check file name wp_enqueue_style( ...


1

I am not sure about "popular", it doesn't seem so to me (but then I don't look at that many themes). You seem to grasp fine what each conditional does, so this shouldn't be confusing to you. This combines conditions to check that blog index is being displayed and it's not at the front page. Ah, the reason for single_post_title() I would guess is that it ...


1

This will display the title of the page when a static page is set to show posts. e.g. I show posts on my homepage... It'll do nothing. If I, say, show posts on page titled News... It'll show News in H1 This is used so that title of the page is shown, whenever posts are shown on a page but nothing when blog posts are shown on front page (home page). We ...


1

You need to create attachment.php in your child theme. Please check here for more details.



Only top voted, non community-wiki answers of a minimum length are eligible