Custom post type, no need for single view, plus want permalink rewrites that include hash in URI

We are using CPT’s to manage a frequently asked questions page on a site, where the question is the post title and the answer is the post content. There is a main page for the FAQs that shows all posts (FAQ archive page). With this structure we really have no need for the single view for any FAQ and in fact would like to omit it from the site structure. To address permalinks we’d like to set them to be something like example.com/faq/#uniqueIdentifier, thinking that we’ll use the #uniqueIdentifier to match a div on the archive page containing the answer and call attention to it in some fashion. The uniqueIdentifier could be post ID, faq question title, data from a meta box, or something else.

qTranslate get content by language

How do you get the content by id and by specific language? I need to display two specific language content in a page, regardless of the session’s language. So far, this is my progress: this works fine for getting the content by id of the active language: <?php $id=47; $post = get_page($id); $content = apply_filters('the_content', … Read more

Trigger JS when featured image upload window is opened in admin

I’m trying to hook up some JS so that when the featured image upload box is opened and an image selected I can use Vibrant.js to analyse the colours of the selected image. The hurdle I’ve encountered is that I can’t find any particular event to bind my function to. I’ve looked at various tutorials regarding the wp.media() object, but they all seem to involve replacing the upload box completely. Is there no straightforward way of detecting when the featured image upload window is open and the selected thumbnail preview image is loaded?

How do you access the Product Short Description in a WooCommerce email template?

I would like to output the Product Short Description beneath the product name inside the order items table inside WooCommerce emails. I think I know where to place code inside the email template file, but I don’t know how to access the description of an item. I don’t see any mechanism to retrieve it. What … Read more