Get WP Install Directory

The WordPress directory path is available in the constant ABSPATH. Be aware this is not related to the wp-content directory. The constant WP_CONTENT_DIR could be set to exactly the same value. Or another directory on the same level where WP_CONTENT_URL is another domain name. There doesn’t even have to be a wp-content equivalent: themes, plugins, … Read more

Theme Translation?

Translation files must be named {locale}.po (e.g. en_US.po in order to be recognized. Rename your language translation file accordingly. See more in the Codex: i18n for developers.

Comments not displaying after changing theme

After the kerfuffle of logging in and acquiring the theme, I got to the code: $comm = get_option( ‘woo_comments’ ); if ( ‘open’ == $post->comment_status && ($comm == ‘post’ || $comm == ‘both’ ) ) { comments_template( ”, true ); } Your comments are not showing because in the woothemes settings, they have not been … Read more

enqueue_script doesn’t work with HTML5 blank theme

I’m not sure but it might have something to do with the html5blank_protocol_relative() function used by HTML5 Blank Theme. You could try removing the filters at L# 382 & 383 of the functions.php file. // Protocol relative URLs for enqueued scripts add_filter( ‘script_loader_src’, ‘html5blank_protocol_relative’ ); // Protocol relative URLs for enqueued styles add_filter( ‘style_loader_src’ , … Read more

Adding a template in WPTouch

As WPTouch uses its own theme, we can’t hardcode certain functionality inside the regular theme, neither in a page/post template nor functions.php. So, a custom plugin is needed and the desired output made out of a Shortcode. Also, make sure WPTouch Restricted Mode is turned off in Advanced Options > Advanced Settings. But probably this … Read more

How to get ONLY the URL of the image that show_media_header returns?

Try this Dynamic Header plugin function: get_media_header_url() instead of this one: show_media_header() It is defined as function get_media_header_url() { global $post; $post_id = $post->ID; //Declare the wpdb var and table name and run the query to see if there is a media object associated with this post global $wpdb; $table_name = $wpdb->prefix . “custom_headers”; $check_q … Read more