Skip to main content

PressPlay Lite WP Plugin is Live

I’ve recently developed a WordPress plugin called PressPlay Lite, which is now hosted on wordpress.org. PressPlay Lite offers music lovers the easiest way to play MP3s on their WordPress site. Simply insert a link to an MP3, and PressPlay Lite will automatically prepend a play/pause button. PressPlay Lite is powered by an extremely slimmed-down version SoundManager 2 (http://shillmania.com/projects/soundmanager2). The simplicity of PressPlay Lite empowers end-users to manage their own audio and rest assured that their guests can listen from any browser on any device.

I have used it on several sites, including my personal music site.

If you’re looking for thee simplest, cleanest, most-flexible way to play music on a WordPress site, please give this plugin a shot. And if you end up liking it – why not make it official? Please submit a rating & review on wordpress.org. Thanks!

UPDATE: Bootstrap Carousel = WordPress Dynamic Content

This is an update to my original post How to make Bootstrap Carousel display WordPress Dynamic Content, so I’ll keep it short…

The Original Source Code

From Twitter.Github.com/bootstrap
[code]

[/code]
Note: Bootstrap developers have added the .carousel-indicators feature sometime after my original post. Below, you will see my solution for generating the “data-slide-to” values dynamically…

Now with WordPress template PHP for dynamic content

[code]




[/code]
Of course you’re free to pass all sorts of arguments within the query_posts('/*your_arguments*/');. I’ve left out “posts_per_page” this time, allowing the default to be whatever you have for Dashboard Settings > Reading > Blog pages show at most = “?” posts.
Note: I’ve removed .active from the .carousel-indicators li, as well as from the .carousel-inner .item. We’ll add it back with jQuery…

Add “active” Class to first items

[code]
<script>
jQuery(document).ready(function(){
$(“.carousel-indicators li:first”).addClass(“active”);
$(“.carousel-inner .item:first”).addClass(“active”);
});
</script>
[/code]
The script must be called after the bootstrap js file, and preferably this is all happening in the footer.

Insert a Paged Blog Loop anywhere in your WordPress theme

[code]
<?php
$temp = $wp_query;
$wp_query = null;
$wp_query = new WP_Query();
$wp_query->query(‘post_type=post&posts_per_page=5′.’&paged=’.$paged); ?>

have_posts()) : $wp_query->the_post();?>


[/code]
Note that the <?php bootstrap_pagination();?> function has already been discussed in our post “Add Twitter Bootstrap Pagination to your WordPress Theme“.

I won’t spend too much time explaining this one. Just know that this will start an independent loop of your choice anywhere you want in your theme templates. And it correctly incorporates wp’s pagination feature, which can be tricky. I primarily use this code in a template I call blog.php. Many clients want either a static home page, or magazine-style home page, but still want a blog-reel displayed elsewhere (a la the common index.php). My blog.php template featuring the above code can be easily added to any internal page of their choice. Of course, there are countless ways to customize the query parameters.

What Happend to WordPress’ Media File URL Option?

Beats me! God only knows why the wp folk decided to hose that option, or maybe it’s a bug. Whatever the case my be, I thought the custom File URL option (found under Settings > Media) was a very handy tool of which I have always made good use, and I want it back real bad. So bad, in fact, I figured out how. Very simply add this to your theme’s functions.php file:
[code]
update_option(‘upload_url_path’, ‘/wordpress/wp-content/uploads’);
[/code]
Obviously, change the path to reflect your needs. Unfortunately, this hard-codes this path from functions.php, so although the field is added back to Settings > Media, and it may look like you can update the path from there, it will not save your changes. But in reality, a developer will only need to change this once or twice.

I find this option handy when developing a site at a temporary domain, knowing it will ultimately be migrated to a live domain. Otherwise, you get a fully-qualified temporary URL embedded in all your media attachments which are going to have to be changed anytime the site is moved to a new domain.
This option has saved me from the headache of having to mess with the wordpress mysql database more than necessary.

I will update this post as soon as I can add some convenience to this temporary solution.