Fränk
  • Member for 9 years, 6 months
  • Last seen more than a month ago
answered
Loading…
comment

Could you post the code of the test that you are using? That would make it easier to understand the issue that you are facing.

comment

Rather than setting the cache header manually, it is preferable to use wp_get_nocache_headers(). This will set the nocache headers used by WordPress Core. This ensures compatibility with a wider array of hosting environments. Batcache for example (which is used by a lot of hosts) will look for a max-age value, and only if it is set will bypass cache.

comment

There is no authentication performed for internal requests.There's also no need for cURL, you can use WordPress' REST code: php $request = new WP_REST_Request( 'GET', '/wcfmmp/v1/orders/' ); $response = rest_do_request( $request ); var_dump( $response->get_data() );

comment

I have trouble understanding what you are trying to do. Are sending a request from the same WordPress instance as the one that has the endpoint, or are these two different WordPress instances?

comment

The registration code shows that you have registered fields for a user, and the screenshot seems to confirm that. For user meta, you need to use get_user_meta(), so I'm not sure why you are using get_post_meta() to get the data.

comment

Could you please show the widget registration code? Meaning the add_action() call that hooks in JU_widgets()?

answered
Loading…
awarded
awarded
awarded
comment

If you are linking to custom post type archives via a custom link, then WordPress doesn't add any current or ancestor classes. This is a known bug, and there's already a ticket on Trac.

comment

It depends on what you are trying to do. If you have a single match (your CPT) and you want to display the type of match to which it is associated (your custom taxonomy), then you could use get_the_terms(): codex.wordpress.org/Function_Reference/get_the_terms The first code example should work.

comment

I assume that single-match.php means that you are on a single view of your custom post type. Are you sure that WordPress runs a custom taxonomy query on this page? Could you run a var_dump( get_queried_object() );?

comment

Underscores are allowed to my knowlegde.Could you check the return value of the `register_tanonomy()' function to see if the registration has gone smoothly?

answered
Loading…
answered
Loading…
answered
Loading…
answered
Loading…
answered
Loading…