CMB2 installation – cannot get it to work

Step#1: Using git clone the latest CMB2 resources to your working project. Step#2: Rename the CMB2-master (or anything else) folder to cmb. Step#3: In your project’s functions.php simply use the following code: if( !class_exists(“CMB2″) ){ require_once( dirname(__FILE__).”/libs/cmb/init.php” ); } (I put all my external libraries to /themes/my-theme/libs/ so I called it so) Step#4: You can … Read more

WordPress Social Login > Post to a users Facebook wall

Im no expert on this but here goes: After reading some code and doing a global search of the filter, its not a filter at all, the only time that filter is called is in a do_action // HOOKABLE: This action runs just before logging the user in (before creating a WP cookie) do_action( “wsl_hook_process_login_before_wp_set_auth_cookie”, … Read more

Add CPT as subpage under custom page

You should be able to provide the slug of your top level page (admin.php?page=my_page) when registering your CPT(s): register_post_type( ‘matches’, array( ‘labels’ => array( ‘name’ => __( ‘Matches’ ), ‘singular_name’ => __( ‘Match’ ) ), ‘public’ => true, ‘has_archive’ => true, // Add your page slug to ‘show_in_menu’ ‘show_in_menu’ => ‘admin.php?page=my_page’ ) );

How to Know if a Plugin can be used with my Theme [closed]

So in theory WordPress extensions are all using its APIs to peacefully and happily coexist. In practice the landscape of WordPress extensions is a brutal mess, with literally tens of thousands of them, produced by developers of drastically different qualification. The two basic practices to mitigate and save your sanity: If you are in a … Read more

Appery.io and WordPress

If you’re using WordPress 4.6, you can use the REST API without the need for the plugin by simply using the following: add_action(‘rest_api_init’, function() { $namespace=”myapi”; register_rest_route($namespace, ‘/myroute’, array( ‘methods’ => ‘GET’, ‘callback’ => ‘handle_my_route’ ), true); function handle_my_route() { return ‘Hello World!’; } } Then, going to: yourwebsite/wp-json/myapi/myroute would return the callback value, which … Read more