WordPress How To create Word document from theme and run it on new order created

require_once( ‘/word/vendor/autoload.php’ ); will try to load starting from the root directory of your webserver. You’re probably looking for something like require_once( ‘./word/vendor/autoload.php’ ); or perhaps require_once( plugin_dir_path( __FILE__ ) . ‘word/vendor/autoload.php’ );. (Note that plugin_dir_path() can be used in themes as well as plugins; the plugin part of its name is misleading.)

Fetch Post Category

If you want to display and fetch all post categories that have posts associated with them and display them in a dropdown list in the WP admin panel, try below the code add in code to your themes functions.php file or in a custom plugin. function get_categories_with_posts() { // Get all categories that have posts … Read more

disable admin bar except administrator

Your third one looks like it should work, though it’s a bit hard to read. I’d recommend something like this: add_filter( ‘show_admin_bar’, ‘wpse424492_admin_bar’, 10000 ); function wpse424492_admin_bar( $show ) { if ( current_user_can( ‘manage_options’ ) ) { // Show the admin bar for Admins. return true; } // Hide the admin bar for anyone else. … Read more

How to solve WordPress accordion problem on Iphone?

For working with accordions in iphone we need to add href=”#id” attributes to tag. <a data-toggle=”collapse” data-target=”#collapse1″ href=”#collapse1″> <i class=”pull-right icon-chevron-right mobile-nav-icon”></i> </a> Please check this link for more help : https://stackoverflow.com/a/19869181/4227367

Modify Post URL Programmatically

When you are using wp_insert_post() there is a param post_name. If you do not pass it then it will sanitise your post title and update. You only have control to add post_name but the full URL is created based on your Permalink settings.