THE PENDING DRAFT

Show “Read More” Link only when there is more content

January 4, 2015

Normally when you post something to your blog, it shows an excerpt on the homepage together with a “Read More” Link in some form which links to the actual content.

But what if your excerpt already is the whole content you want to display and there is no more content to read. Of course you could use the_content inside your loop. That works in most situations, but in some situations you actually wan’t to check whether there is more inside the post than what you already got with your excerpt.

After a bit of fiddling around with different snippets, i came up with this solution, which still has some flaws, but works for what i used it now.

<?php if ( strlen(get_the_content()) > strlen(get_the_excerpt()) ) : ?>
  <p><a href="<?php the_permalink(); ?>" class="more-link">More</a></p>
<?php endif ?>

What it does is comparing the length of the strings of get_the_content() and get_the_excerpt() and only output our custom more link, if the content is longer.

I’m not 100% sure if this is the proper way of doing this, but it worked for me. If you know any other ways of achieving the same result, go ahead and add it in the comments.

WordPress.org Support Thread 

Another Video Introduction to Backbone.js

January 3, 2015

While the video intro i shared yesterday gives a nice overview to some basics of Backbone.js, it left many things untouched and unfortunately the code examples weren’t really complete which made it hard to follow along.

Luckily i found this other talk by Nick Gauthier which goes a lot more into detail but is still very understandable, even if you’re just starting out with JS. The talk starts with a short theory part, which really helped me finally grasp some of the basic concepts behind Backbone. After that he demonstrates everything in a practical hands-on coding example, which is very easy to follow and well explained.

If you want to learn some more about Backbone.js, you should definitely watch this.

The presentation slides and source Code can be found here.

He also wrote/co-wrote two Ebooks, “Mobile Web Patterns with Backbone.js” and “Recipes with Backbone“, which i will keep an eye on and intend to read right after i finished Addy Osmani’s “Developing Backbone.js Applications“.

An Introduction to Backbone.js

January 2, 2015

After several not so successful attempts to understand Backbone.js by just staring at the code in WordPress Core that makes up the Media Uploader, i decided it is time to jump in and learn some more about it from scratch. It’s pretty overwhelming at first, especially if your JavaScript knowledge is only basic, which is one thing i’d like to change this year.

I might share some of the best tutorials and introductions i found useful along my way in a later post, but for now here’s a good short video introduction to the basics of Backbone.js by Sidney Maestre that i just found:

Designers:Watch – a collection of must-see documentaries for designers and artists. Perfect for the holiday break.

Designers:Watch

John Cleese Talking About Creativity

August 16, 2014

John Cleese talks about how the ability to switch between the “open” and “closed” mindset can help us be more creative. Great Talk!

Chris Lema on the art of giving estimates

June 24, 2014

Chris Lema with some practical tips and his personal way of giving project estimates. Best article i read on the subject in a long time.

“I know you may think that if you give me a budget I’m going to make the project use up all that budget, even if it’s smaller. Let me assure you of one thing – and this isn’t personal and it’s not you. Most people’s budget is 2-3 times smaller than their desires or expectations.”

Chris Lema – The art of giving an estimate (that’s helpful)

webdesignrepo

April 1, 2014

webdesignrepo is a curated collection of helpful links from around the web. Primarily the repo is for webdesign links, but there is a large overlap with web development and graphic design.

Huge collection of all kinds of links related to webdesign, sorted in “Daily Visits, Blogs/News, Inspiration, Learning, Tutorials, Snippets, Plugins, Architecture, Tools, Resources and Community”. Definitely something to bookmark!

Am I Responsive?

January 17, 2014

A pretty nice tool that let’s you enter a URL and then displays the page rendered on different viewports.

Am I Responsive?