Articles of code

How do I get access to the CSS Editor

I have a blog which is hosted by an ecommerce company who also host my website and online store. Because of this, they uploaded the theme I requested – Penscratch. I couldn’t do it myself. I now want full access so that I can edit the design of the blog fully. At the moment, within […]

using wp enqueue style to create a CSS file specifically for a page template

I am trying to create a CSS file that only works for one page template. I am trying to do it using wp enqueue style but to no avail so far. I was able to get it to work (sort of) using the following in my header.php. <?php if( is_page_template(‘background-slider-template.php’) ) { ?> <link rel=”stylesheet” […]

wp_get_http has been deprecated. Use WP_Http instead

I use a premium plugin (for theme dev.) that has included the WordPress Importer plugin and I get a deprecated notice: “wp_get_http has been deprecated. Use WP_Http instead” But the WP_Http send me to this function. The question is how to use wp_http_supports in the following code instead of wp_get_http: function fetch_remote_file( $url, $post ) […]

How to write custom code on WordPress?

I need to write some function so that WordPress can get uploaded image from remote client tool, and found this one seems to fit my need: How do I set a featured image (thumbnail) by image URL when using wp_insert_post()? However, I don’t know how to add-in code snippet suggested in answers. I mean the […]

Automate configuration after new/hosted installation

Lets say I launch a new WordPress site at a hosted provider such as WPEngine. As I start to configure my site (install a template, install plugins, create layout and content for my pages, etc.), is there a good way to record what I’m doing in code or otherwise codify and centralize those modifications so […]

Find Total Authors

Please suggest a code snippet to get the total number of authors on a blog who have at least one published article. Thanks

How to Configure Events List in WordPress to Disappear Event Once Date is Past

I currently have some code setup to display upcoming events set by the admin based on the date of the event. The upcoming events are sorted by the next upcoming event, starting from the top, and then going down. I’ve limited it to just two. But, when the start of the day comes (e.g. midnight […]

Displaying Meta-Box Data Properly

Quick and dirty, I have meta boxes pertaining to concert information. (i.e. venue and location) and am trying to figure out how to properly display them in my post. At the moment to display the meta-box data I have <?php $venue_info = get_post_custom_values(“venue_info”); if (isset($venue_info[0])) { }; ?> <?php if( $venue_info[0] ) : ?> <?php […]

Numbering lines of code with the <code> tag?

The wordpress tag is used to display code on a page (refer to: but I am having a hard time finding a function that will number the lines of code, as seen on Does anybody know where this function can be found?

Where do you add code in custom fuctions so it works on a specific page?

Thanks for replying but I still can’t get it to work. Is anything wrong with this code? <?php class custom_loop extends thesis_custom_loop { function page() { if(is_page( array(‘career-work’,’happiness’))) { global $thesis_design; $thesis_design->home[‘body’][‘content’][‘features’] = 0; $thesis_design->display[‘archives’][‘style’] = ‘teasers’; $thesis_design->image[‘thumb’][‘y’] = ‘after-headline’; $thesis_design->teasers[‘options’][‘date’][‘show’] = 0; $thesis_design->teasers[‘options’][‘excerpt’][‘show’] = 1; global $wp_query; $saved_query = $wp_query; thesis_loop::page(); wp_reset_query(); $args = […]