You sad you put the json in wp-includes
, but in the url you wrote wp-content
. So I give you the code for getting the server path for both folders:
// wp-includes
$file = ABSPATH . WPINC . '/json/users.json';
// wp-content
$file = WP_CONTENT_DIR . '/json/users.json';
You can find many WordPress constants (like ABSPATH
, WPINC
and WP_CONTENT_DIR
on http://wpengineer.com/2382/wordpress-constants-overview/
Related Posts:
- Error Warning: Declaration of description_walker::start_el after PHP upgrade [duplicate]
- How to use nonce with front end submission form?
- Autoloading in Child Theme
- WSOD but WP_DEBUG not giving any errors
- How to loop through JSON data in wordpress WP REST API
- Rename image uploads replacing “width” and “height” in filename with “medium”, “large”, “small”
- How to remove “out of stock” variation options from size dropdown in woocommerce?
- WordPress Customizer: How can you have multiple active callbacks on one control?
- Looking for a better way to handle an ajax script that pulls in post data on click
- add_rewrite_rule with bottom priority doesn’t handle the WordPress pages
- Adding featured image via PHP
- wordpress custom endpoint multiple params
- Enable errors PHP WordPress 5.2
- How to set status codes such as 401 and 403?
- Minify HTML, CSS, JS with PHPWee?
- Show Custom Taxonomy Title
- How do themes render caption texts in extended markup (e.g. “wp-caption” paragraphs)
- WordPress widget/sidebar dividers?
- Add custom php database code above
- PHP code inside shortcodes
- Help with some php math in WordPress
- max_input_vars: how many am I using?
- Multiple WordPress Menus that will only display all pages
- Latest post in a specific menu
- WordPress not reflecting changed of the database
- Woocommerce related product text
- how to combine wordpress htaccess on my root domain + php on subfolder
- WordPress, AJAX and pre_get_posts using conditional tags
- Input data from email form not going to JSON file
- Font Awesome changing default WordPress Font
- Help with a $wpdb MySQL Query
- Use .php file as page instead of wordpress page & template file?
- How to get post permalink url without a href
- Resize image to specific dimension (X to Y ratio)
- How to keep track of when a vote is cast?
- Convert the_permalink() function output into string
- AJAX wp_insert_user WORKS but responds with “The site is not enabled”
- Redirection after submitting duplicate comment
- Fatal error: Uncaught Error: Call to undefined function get_header() [closed]
- get_current_site() is undefined
- blank white page when post/update/change option etc
- Incrementing PHP variable onclick to display posts by month
- WordPress PHP syntax doesn’t seem to be working correctly
- Use variable in SQL statement
- How to edit wordpress pages through cpanel? [closed]
- Is it possible to restrict files from your wordpress uploads (not logged-in users or guest)?
- Adding attribute to the post.php form tag in wp-admin
- limit number of post for achive page
- writing an unique php function to be used on my website
- Using Custom Value Options in PHP
- How to get movies by date
- Get options from database using php class
- Problem in replacing the_content with the_excerpt()
- Is there way to toggle the publish date display?
- Need to add a post’s featured image to a section on the frontpage
- Output product category link from WP_Query
- Adding onload to body for certain pages
- Additional file upload in Gutenberg page options/featured image
- Variation prices breakdown only for single product page
- Change wordpress’ database data using ajax – how to get current user id?
- Add css class to string
- How to block specific user id in custom login form?
- Dropdown Category form. Only show Sub-Categories
- How to use wp_ajax_set_post_thumbnail?
- Best way to use variables in multiple functions?
- Passing a value from an input field to a php function in WordPress?
- Display all categories including sub categories under a list ul
- WP Hook Before a post is created
- Get product price in a different currency using WooCommerce Currency Switcher
- Store user form submitted information in post type
- Block that renders html saved in a php file
- Cannot fetch posts with certain ‘product_cat’. WP_Query is empty
- WordPress files break if I edit them, but adding a closing PHP tag fixes it
- $_GET[‘title’] in WordPress
- Can’t update or install plugins in WordPress, php unidentified index
- Detect what link user clicks and Redirect to a specific page for logged in users only
- Offset with ajax load more posts duplicates
- Displaying logged in user name
- How to detect if a revision was made by woocommerce or wordpress?
- Efficient way of querying for a “fallback” post?
- Shortcode in a $output statement
- Create a hierarchical loop at predefined markup requirements
- Setting ‘post_format’
- WP Redirect with user nickname/username
- If else statement based on referral URL
- Archive page if else not working for post_excerpt and post_content
- Custom Meta Boxes and Fields Multicheck Issue
- nested divs, classes for a grid in loop [duplicate]
- Hide sharing box and author box with a metabox on WordPress
- WordPress Website Featured Image Replacement Issue
- syntax error unexpected ‘}’ at 364 line
- 500 error when using wp_upload_dir() [closed]
- Why can’t I include echo inside a variable? [closed]
- WP_Query not returning results
- Using Excel formula in PHP. Use ^ symbol [closed]
- PHP warning Invalid argument supplied for foreach() on custom page template
- Not able to see the error [closed]
- How do I link the side images?
- Assign new post author IF another user in custom field on post transition
- How can add alt tag in following code. Image are showing dynamic in wordpress