WordPress as template engine

You might be misunderstanding exactly what WordPress is and how it operates. WordPress is a content management system, which in addition has it’s own API for working with the data held in the WordPress database as well as numerous other functions, actions and filters to help you achieve your desired result. WordPress also has it’s … Read more

Theme Custom Pages

You can use wordpress templates to load for a particular page. just create a template file with any name ( place template definition in file i.e commented code to declare a template) and select it as a template while adding a page. in this way file will be loaded automatically for page and you can … Read more

Create WordPress posts from JSON array using plugin in admin

Here I assume your json is an array of object where properties are named like wp_insert_post arguments: ‘post_title’, ‘post_content’ and so on. function process_ajax() { if ( ! isset($_POST[‘nonce’]) || ! wp_verify_nonce($_POST[‘nonce’], ‘mynonce’) ) die(‘error on checking nonce’); if ( ! isset($_POST[‘filepath’]) die(‘no file given’); if ( ! file_exists($_POST[‘filepath’]) ) die(‘invalid file given’); $posts = … Read more

First plugin, problem with get_pages

Take a look at this to get you started. Then work from here. There were a number of things you had wrong, and I think this will clarify. <?php /* Plugin Name: Child Pages Query Author: Sten Winroth Plugin URI: Description: Version: 1.0 Author URI: Domain Path: /languages Text Domain: */ class childPagesQuery { private … Read more

WP Google Fonts question [closed]

google web fonts are saved on google’s servers not your’s, when you apply a font to your site the stylesheet link will be included in your document’s head section, the stylesheet and font will be directly downloaded to client’s (visitor) browser, there is nothing any bandwidth usage from your server for the google web font. … Read more

Show Woocommerce Product “attributes/extra information tab” in widget [closed]

Checkout the content-single-product.php WooCommerce template for an idea of what functions are hooked where. It is very well commented. The following should remove the additional info from the tabs: add_filter( ‘woocommerce_product_tabs’, ‘wpa_116999_remove_info’ ); function wpa_116999_remove_info( $tabs ){ unset($tabs[‘additional_information’]); return $tabs; } And then wherever you’d like to add the Additional Info you’ll just need to … Read more