How can I make 2 plugins that include different versions of a framework to both use the latest version?

This is serious problem with WordPress and composer. Whatever you do, you are just asking for future problems and/or making life hard for your plugin users. Guess what – even if you manage to load correct version of framework for all your plugins, WP user may unknowingly install some other plugin, which also uses the … Read more

Can Angular be used in/with WordPress?

Logically, I think this can be done. There should be a way to integrate Angular along with WordPress for your SPA. You would have to use the wordpress REST API to connect them both though. Also, you would need to enqueue the scripts in functions.php for the same. Although I am not sure about running … Read more

Resolving Javascript errors likely related to Gantry framework

Fixed. Thanks to some feedback on reddit (see this thread and this one), I learned that the issue was that the mootools.js script was being loaded far too late. I solved it (rather inelegantly, I’m sure) by adding this line to themes/rt_gantry_wp/index.php, around line 30 or so (before the if blocks): $gantry->addScript(‘/wp-content/plugins/gantry/js/mootools.js’); It’s no longer … Read more

Cherry framework adding custom post type

At the end of your code after the last } add : add_action(‘init,’products_post_type’); Make sure you’re adding this to the file in the /wp-content/your_custom_theme/includes/theme-init.php file, and then of course update the permalink. With the CherryFramework, make sure you don’t modify any of the files in the CherryFramework folder, or you’ll lose out when an update … Read more

Updating parent themes vs. updating starter theme

You can enable child themes for any theme: http://codex.wordpress.org/Child_Themes If you want your parent theme based off another parent theme, for example you want a theme based off of Twitter bootstrap and apply any changes they make to your framework, without over-riding your changes, use revision control. Git Mercurial etc.

Add Tags to custom post type

It seems the issue was in part down to their being a theme-init.php in the child theme which was overwritting parts of the theme-init.php in the parent / cherry framework theme. I resolved the issue by adding the following code into my child theme’s theme-init.php; register_taxonomy(‘team_tag’, ‘team’, array( ‘hierarchical’ => false, ‘label’ => theme_locals(“tags”), ‘singular_name’ … Read more

medoo framework in WP plugin

medoo and other similar libraries are generic, that is they are aimed at querying some database in general and the weight of figuring out necessary queries are on you as developer. WP_Query and other WP APIs that perform requests to database are much more specific. They already contain much of that logic, which allows you … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)