Hierarchical List Pages as a table

With such custom requirements it’s unlikely you will just happen upon a snippet to achieve it. This is considerable chunk of customization and working with hierarchical data is always challenging. When you are working with wp_list_pages() what is happening in background is that it compiles data and passes to instance of Walker_Page class, that extends … Read more

How to callback custom field text

Your text is already in the array $m_slider_custom, from this line: $m_slider_custom = get_post_custom($post->ID); If you just want the specific key feat_music you can use get_post_meta(): echo get_post_meta( $post->ID, ‘feat_music’, true ); Another, unrelated thing- I suggest spending some time with the Codex and cleaning up your URLs and paths. For example, this: get_option(‘siteurl’) . … Read more

Show page without reference to post (like front-page)

Thanks to toschos hint I could solve the problem. This is the code that I use: // Register the endpoint function my_init() { add_rewrite_endpoint(‘votes’, EP_ALL); } add_action(‘init’, ‘my_init’); // Execute a function when the endpoint is called function my_redirect() { global $wp_query; if (isset($wp_query->query_vars[‘votes’])) { $wp_query->is_404 = false; add_filter( ‘wp_title’, ‘my_title_votes’, 10, 2 ); // … Read more

Rewriting WordPress URLs

The first important difference between your rewrite rule, and the ones that Pippin has provided is that all of his rewrite rules point to index.php. This is an absolute must, you won’t get it to work any other way, all requests must point to index.php with your query vars appended. The second important thing to … Read more

Jetpack email sharing button to include image on email sent

wp_mail does not support rich formatting, so you can’t just embed the image in the body. It does, however, support attachments. If you read about the function, you’ll see it has a parameter for attachments. Try hooking your attachment there instead: http://codex.wordpress.org/Function_Reference/wp_mail $attachments (string or array) (optional) Files to attach: a single filename, an array … Read more