display a slider outside of subdomain folder wp

In a normal WP flow following happens: Web server get request for pretty permalink (typically) and sends it to index.php of WP installation. WP core loads and displays a page, respective to that input. In your case the root of the site points to something different entirely. So there is no WP core load happening. … Read more

Help with sorting and storing data on WordPress

Why do you want to go for a custom MYSQL database altogether? You can simply use custom post types for products. Please check http://codex.wordpress.org/Post_Types You can add images, custom fields such as review, ratings etc. There are many plugins that can help you create custom post types easily. https://wordpress.org/plugins/custom-post-type-ui/ https://premium.wpmudev.org/project/custompress/ There is another plugin you … Read more

Creating custom URL for async content

In general the pretty permalinks are domain of Rewrite API in WordPress. But they convert the links into query variables for back–end PHP side of it. Hashbang links are domain of JavaScript. It is impossible to say how easy would be to change them, without very specific knowledge of how theme’s JS implements them.

Get page content by ID (from a plugin)

The values assigned to $user_set_value should be stored somehow in some form, usually an option. You will know how the values and where the values are stored. It is easy then from there $user_set_value = get_some_saved_option_value(); $args = array( ‘page_id’ => $user_set_value ); $q = new WP_Query( $args ); Just change get_some_saved_option_value() with the actual … Read more

Merge custom plugins in one folder

Choose one file to be the main file of the plugin. From it, use require_once( plugin_dir_path( __FILE__ ) . ‘another-file.php’ ); for each of the other files you want to include. This means the rest of the files no longer need the plugin comment header, just the actual code that does whatever you need it … Read more

Write mysql credentials in plugin

As long as you aren’t passing out the plugin and other people don’t have access to it, you should be fine. You might add something like the following to the top of the file just in case though: defined(‘ABSPATH’) or die(‘Access denied’); That will simply make sure that the file is loaded via wordpress (e.g. … Read more

Where to insert customize_register in wordpress plugin

You can use the customize_register action like this: function my_customize_register( $wp_customize ) { /* Just use the $wp_customize object and create a section or use a built-in section. */ $wp_customize->add_section( ‘my_section’, array( ‘title’ => ‘My Section’, ‘priority’ => 30, ) ); /* Now you can add your settings … */ $wp_customize->add_setting( ‘my_options[my_first_option]’, array( ‘default’ => … Read more