first instantiated SimplePie object cosumes 5mb?
This is a known issue. It is caused by a bug in PHP 5.2 and is fixed in PHP 5.3. You need to manually call the destructor method before unsetting the $feed and $item variables. source
This is a known issue. It is caused by a bug in PHP 5.2 and is fixed in PHP 5.3. You need to manually call the destructor method before unsetting the $feed and $item variables. source
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
As @s_ha_dum mentioned in the comments, building an API or some sort of XML or JSON feed (or leveraging one that’s already there, or installing a plugin on whatever system that is, etc) is really your only way of getting at that data remotely. Once you get that going, you can use wp_remote_get to query … Read more
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(); }
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…
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
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
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
bloginfo(‘template_url’) is the wrong function, you need home_url: <div class=”subnavLinks”> <a href=”https://wordpress.stackexchange.com/questions/104386/<?php echo home_url(“/contact-us/get-a-quote’); ?>” class=””><img src=”/uploads/quote.png” class=””></a>
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 ^^