Articles of theme roots

3 Level Deep Navigation Menu Not Showing All Levels

I have a 3 level deep navigation menu which will show beside all pages on the site except the homepage. The issue is only 2 of my 3 levels are showing in the menu when displaying it using the wp_nav_menu. I’ve tried specifying the depth parameter and without it to no avail. I am using […]

How to know which order WordPress places CSS files?

I’ve installed the Roots theme (version 4 so I can use the 1140px Grid) on WordPress 3.3.1, and want to edit the CSS. Initially I only get the style.css file in the editor and can’t see the others. The css files I need are located in a subfolder marked ‘css’, and I see from a […]

How To Run Multiple Multi-Site Networks On Same Box

I’m building a multi-site project locally using the VVV Vagrant VM. I setup a sub-domain multisite install with domain mapping and two sub-sites. Everything works fine. This was my sandbox that I used to get started and figure things out. Now I’ve setup a new, exact replica (obviously URLS are different) of that working multi-site […]

Getting Permalink within the loop

I have a (Roots/Sage-based) theme with a home.php template override and on that page am displaying excerpts and featured image for each post. <?php while (have_posts()) : the_post(); ?> <div class=”.container-fluid”> <?php if (get_post_type() == ‘instruments’) {?> <div class=”col-md-3″> <h1><?php the_ID(); ?></h1> <a href=”<?php get_post_permalink(the_permalink()) ?>”><?php the_post_thumbnail( ‘medium’ ); ?></a> <?php get_template_part(‘templates/content’, get_post_type() != ‘post’ […]

Load Gallery Images with Title on Homepage BX Slider

I need to display all thumbnails of a gallery on the homepage using the Roots theme with links to one page with a shortcode. The gallery has to be loaded as list items using BX Slider’s jQuery to create a carousel. HTML code: <ul class=”bxslider”> <li><img src=”×150″ /></li> <li><img src=”×150″ /></li> <li><img src=”×150″ /></li> <li><img […]

Two exact templates, sidebar showing in one but not the other

I’m using the Roots WP Theme and for some reason when copy pasting the page-custom.php to create a home page template. The new homepage template is showing the sidebar but not the original page-custom template even though the two template files are exactly the same at this moment. Can anyone explain why this might be?

Change the name of the root name of an already built WordPress theme

If I have built a site using an existing theme (i.e. “Twenty-Ten”), but then modified it considerably and want to re-name it entirely, how would I go about doing this without breaking all the links? I know I can simply text-edit the style.css to change the name there, but I’m referring to the root all […]

the_permalink() not working in a root installation

I hope someone can help me. I have a root installation of WP, but not as index.php (it’s actually news.php). Consequently the_permalink() doesn’t work, as the root of the website is a different page. Is there any way I can fix this? Perhaps something in the .htaccess that detects ? in the URL and redirects […]

Warning after create Custom post type with Roots theme

I’ve created e Custom post type with Roots theme, adding the custom script inside functions.php like require_once locate_template(‘/lib/custom-post-types.php’); // Custom post types After that in backend the list of pages is not displayed, and in frontend show this Warning: Warning: strpos() expects parameter 1 to be string, array given in /wordpress/wp-includes/query.php on line 2375 Warning: […]

Incorrect 404 for pages when using permalink, a static front page, and posts page

I am having an issue with my permalink setup, which I think has to do with my setup, rewrite rules, and more. Under Settings->Reading, we have a static Front Page set as well as a Posts page (Home and News, respectively). Under Settings->Permalinks, I have a custom one set up as /news/%postname%/. Basically, I want […]