PHP - Category Archive

New Website Woes – What’s Normal?

So you’ve just launched your brand new website design. You’ve gone through weeks or months of development and revisions, and you’re so excited to show it off to the world. But then… A confused text from a client whose just visited your new site. “I can’t navigate to any of the sub-pages on my phone!” he says. Your mind immediately … Read More

How to Pass a PHP Variable to JavaScript – Easy Way

For something seemingly so straight-forward, you would think that the information out there would be a bit better on this subject. Passing a variable from PHP to JavaScript is actually very easy! There are just a couple things you need to keep in mind and some ways to do it to ensure it actually works. I find that putting the … Read More

How to Add Reusable Content Block in X Theme & Cornerstone

Working every day with X Theme and Cornerstone, I frequently find myself needing to re-use sections of my content on different parts of my website. While I know that I could save a block of Cornerstone content as a template and re-use it, the problem is that it wouldn’t update whenever I redid the master template. So how do we solve this … Read More

WordPress: How to Manage Site Files Without FTP Access

As a web developer, I frequently encounter situations where I need to have access and modify files in the root directory or within the WordPress install and I don’t have FTP access. Often, I simply want to update some plugins but don’t want to do it without access to these, in case something goes wrong. Well now you can do … Read More

How to Remove Filters Using Child Theme

Disabling filters included in a parent theme using your child theme’s functions.php sounds like something that should be really easy, but it’s actually a little tricky to figure out. If you’re here, you probably already figured out that you need to use remove_filter, but might have noticed that it isn’t working. The reason is probably that the child theme functions … Read More

Radial Search & Results Page – WordPress Tutorial

Performing a radial search (showing results based on location, zip code, etc) in WordPress is one of the hardest things I’ve had to figure out how to do. It held me back in many projects and was always a source of frustration. After trying many different plugins and tutorials, I have finally come up with a working solution. Today I’m … Read More

Pass PHP Varibale to Javascript – The Easy Way

Young Blanding's Turtle stretches out it's neck.

Taking a variable from PHP and sending it to javascript seems like a really simple thing to do. But it’s not. I’m sure if you ended up here, you’ve tried and tried to get it to work with little success. I’m not sure what the people online are talking about, none of those solutions seem to be functional in most … Read More

Passing a PHP Variable to Javascript in WordPress: The EASY Way

Close Buildings

If you’ve made it here, odds are you’ve already been through the depths of the internet, full of “simple” tutorials talking about how easy it is to pass a variable in your PHP code to Javascript in WordPress. Maybe they even have simple, foolproof examples. The only thing is, they don’t work. WHY don’t they work? Who cares! They are … Read More

Limit Word Count in WordPress Excerpt

Word-limited Post Excerpts

I came across a great way to limit the number of words displayed in the excerpt for a WordPress post, brought to you by the good folks at Cuppa (update – link removed because the site is gone). This method will allow you to choose a specific word limit every time you use the_excerpt or get_the_excerpt in your template files, … Read More