This website uses cookies to allow us to see how the site is used. If you continue to use this site, we assume that you are okay with this. If you want to use the sites without cookies, please see our privacy policy.

Integrating responsive-nav.js into WordPress Navigation

Responsive Web Design is all the rage these days. It’s been around since 2009 but it’s really made it way into the main stream this past year. Clients are asking for it, web developers are expected to know it, and most importantly, mobile devices are more popular than ever. One big area of a website were we must be particularly attentive to is website navigation. In my book, Responsive Design with WordPress, I talk all about responsive navigation and how to make it work nicely in WordPress. In this snippet, I’m going to show you my favorite method: responsive-nav.js.

Continue reading “Integrating responsive-nav.js into WordPress Navigation”

Disable WordPress Directory Browsing With Your Apache .htaccess File

This code snippet will disable WordPress directory browsing and stop people from seeing your directory contents directly.

In a default WordPress installation people can browse your core directories and see the file contents by pointing there browser at; (for example)

http://www.yourdomain.com/wp-content/uploads/

This may be handy for you as a developer, but do you really want people browsing your images and other files?

Disable WordPress Directory Browsing

Prevent this from happening by placing the following snippet into your .htaccess file in the root of your WordPress installation.

######## begin prevent directory browsing ########
Options All -Indexes
######## end prevent directory browsing ########

Now when people try to snoop your directory they will see the following;

https://advent.elliottrichmond.co.uk/wp-content/uploads/

Enjoy.