I want to add the alt attribute to all the photos!

If your current code manages all blocks with images replacing usage wp_get_attachment_image_src with output of hardcoded img tag, with echo wp_get_attachment_image() which will return img tag as string with default alt of image or empty if non set will work. Below is your code updated with idea described. <?php class home_main_post_below_list extends AQ_Block { //set … Read more

feed url problem

Don’t know if this is your only issue, but you’re using the_title() to build your URI. This ECHOS the title, which is not what you want. Instead, you should be using get_the_title(). I’d also urlencode the title, as Jan suggested. Your best bet is to print out the YouTube URI after you build it, then … Read more

Code Highlighting in BlockQuote

First of all you should use the standard pre and code elements instead of blockquotes. But if have too many to change them, there might be a workaround. If you only use blockquotes for code, then you can use a bit of jQuery to convert those to pre tags, but make sure to do that … Read more

Is it possible to use github:gist with WordPress? [closed]

No. As scribu mentions, you can do this on a self-hosted WordPress site with a plugin. In WordPress.com, though, you don’t have access to these plugins and must depend on the oEmbed support WordPress.com extends you by default. Your best bet is to contact their support team directly and ask if/when they’ll have support for … Read more

Open all external links in new window – need help with the code

Way to complicated to do this with php in WordPress, I’d advice on doing this on the frontend with a bit of jquery magic. I wrote a tiny jQuery plugin that opens all external links (all links with another domain/host name than the current site) in a new window. Check out the plugin: https://www.npmjs.com/package/jquery.jold.external-hrefs To … Read more