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

Plugin function inside custom plugin

You’re probably making the check too early. Make sure all plugins are loaded before trying to access the methods they provide. You can hook into plugins_loaded action to make sure all plugins are loaded before trying to use the functions they define. class My_Plugin { public static function init() { if( function_exists( ‘wp_bannerize’ ) ) … Read more

How can i force wp-admin to use 2-column dashboard layout? [closed]

This should help: function so_screen_layout_columns( $columns ) { $columns[‘dashboard’] = 2; return $columns; } add_filter( ‘screen_layout_columns’, ‘so_screen_layout_columns’ ); function so_screen_layout_dashboard() { return 2; } add_filter( ‘get_user_option_screen_layout_dashboard’, ‘so_screen_layout_dashboard’ ); On dashboard screen options it will show 1 or 2 columns, after clicking 1 column after refresh will still be 2 columns. You can change to whatever … Read more

Get all woocommerce comments/reviews

Please try this: $args = array( ‘number’ => 100, ‘status’ => ‘approve’, ‘post_status’ => ‘publish’, ‘post_type’ => ‘product’ ); $comments = get_comments( $args ); where you can edit the number of comments to your needs. Debug: Maybe something is changing it via the pre_get_comments hook? To debug it you can check out the SQL query … Read more