Styling the second sidebar

Per the register_sidebars() Codex page, the CSS ID of the sidebars gets incremented by default. In other words, if you’re not explicitly setting the id array value — and in your code sample above, you aren’t — you would end up with sidebars with CSS IDs of sidebar and sidebar-2. You can then style them … Read more

How to modify the default feed via a function

You could try out the template_redirect action to overwrite the default feed template: add_action( ‘template_redirect’, ‘custom_template_redirect’ ); function custom_template_redirect() { if (!is_feed()) return; header(‘Content-Type: ‘ . feed_content_type(‘rss-http’) . ‘; charset=” . get_option(“blog_charset’), true); // your own template stuff here exit(); }

php include not working in custom page

WordPress has its own connection class, which can be used trough the $wpdb object. Is there a particular reason to use direct queries to the db, instead the wordpress functions (get_posts, get_post_meta, get_option)? Keep in mind that by doing this, you loose a lot of the wordpress tools, such as cache, filters, etc…

Should I use WordPress to skin a database website?

WordPress is an ecosystem of its own, and it’s pretty fat in terms of memory use and existing APIs and structures. Integrating this huge behemoth with a lean back-end that you have already built on your own won’t make much sense unless you specifically want to use WP’s back-end functionality instead of yours. WordPress themes … Read more

How can I exclude a dynamic URL to show a popup created using ‘WordPress Popup’ plugin

Within the javascript file the developer calls a method when the page loads. jQuery(window).load(po_selectiveLoad); This methods calls another method. function po_selectiveLoad() { po_load_popover(); } If you replace it with this function po_selectiveLoad() { var urlString = new String(window.location.href); if (!urlString.match(/\/cart\//)) { po_load_popover(); } } Of course this is not good because you will need to … Read more

wpdb prepare insert table doesn’t work

I’m pretty sure that first SQL query isn’t correct SQL (insert has different syntax) 😉 It should be: INSERT INTO {$wpdb->prefix}awpcp_adphotos (ad_id, image_name, disabled, isprimary) VALUES (%d, %s, %d,%d) In second example, I’m almost sure that ad_id is not string, and image_name is not a number. Of cours I’m only guessing, because I haven’t seen … Read more

meta box not display data input in the textarea

Ok, you do have a typo : add_action(‘save_post’, ‘vs_save_custom_meta’); should be : add_action(‘save_post’, ‘vs_save_excerpt_meta’); So you meta box does not have a valid callback. Change this and it will work ^^