WordPress Settings API settings not saving for some users

Here are few remarks after skimming through your code: you are using options name like id, title and global. You should use a prefix on these names, like vegas_, to avoid possible problems with other stuff using these option names. you should let the users know about validation problems (check out the add_settings_error() function) use … Read more

How to use HubSpot Forms API in WordPress pages?

The easiest way is to use HubSpot’s PHP wrappers to get the data you need: https://github.com/HubSpot/haPiHP Basically the wrappers are just JSON data fetchers, so you can also just take out the code you need from the wrapper source, if you need to. Create new HubSpot_Forms instance and use e.g. the get_forms() to get the … Read more

Custom permalink structure for remote content pages

I think your problem has several solutions. If you don’t want to have one entry in WP database for each remote item, a possible solution could be to have a page with property slug and add a rewrite rule to get the ID number: add_action( ‘init’, ‘cyb_property_rewrite_rule’ ); function cyb_property_rewrite_rule() { add_rewrite_rule( ‘^property/([0-9]{1,})/?$’, ‘index.php?pagename=$matches[1]&remote_ID=$matches[2]’, ‘top’ … Read more

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

WP AJAX API with JS file

Currently I’m assuming that is is backend (front end is slightly different), but it’s very easy to implement on the frontend if required. You are correct in thinking that because you haven’t used the WordPress admin-ajax.php file, all the goodness of WordPress is missing. Fortunately this is easily fixed. Before continuing I recommend that you … 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

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