Theme Customization API Changes not Saving

Well, first problem: $wp_customize->add_setting( ‘tcx_footer_copyright_text’, … echo get_theme_mod( ‘tcx_footer_copyright_message’ ); Those aren’t the same setting names. Note sure why you don’t see the default value in the input field, as there’s nothing wrong there. Although you should also define the same default in the second parameter of the get_theme_mod() call.

Integrate WooCommerce to PromoSoftware Rest API

You have some syntax errors in your example code. Line endings should be ; Im sure you are aware. Your array declaration is missing the trailing ). Also using this library the format is appended to the url so this will fail, leave the format empty. This API only returns json anyway. This should get … Read more

Implement External API into WordPress [closed]

First, I highly recommend you get to know your data model before doing anything. For this purpose I recommend dumping the raw JSON into a linter or formatter (e.g. JSONLint) to see what you’re dealing with. That said, what Brian suggests is appropriate — you should take a look at the object you produced from … Read more

Use WordPress user database in external php application

If your main concern is using your WordPress database for user authentication, I’d look into the WP OAuth Server plugin. We use this for authentication with a 3rd party mobile app: app users type their username and password into the app which then – thanks to the plugin – authenticates them against their credentials in … Read more

Soundcloud Smart Player

If a shortcode isn’t too much effort you can use it to construct the soundcloud url for embedding. add_shortcode(‘soundcloud_auto’, ‘soundcloud_auto_shortcode’); function soundcloud_auto_shortcode($atts) { global $post; $title = str_replace(” “, “”, $post->post_title); $title = str_replace(“-“, “”, $title); $title = str_replace(“_”, “”, $title); $slug = sanitize_title($title, str_replace(“-“, “”, $post->post_name)); return wp_oembed_get(esc_url(“http://soundcloud.com/$slug”)); } Or do something similar using … Read more

Where to put API Code?

You can create a plugin to contain your code. The admin_post_ action can be used to trigger a request handler. WordPress core will be loaded, and the API will work. <?php /* Plugin Name: Ben’s GF Plugin */ // for logged-in users add_action( ‘admin_post_ben_gf’, ‘ben_gf_handle_request’ ); // for non logged-in users add_action( ‘admin_post_nopriv_ben_gf’, ‘ben_gf_handle_request’ ); … Read more

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