never access theme or plugin files directly in their directory, this is a non secure way to develop code which will be blocked on any server with hardened security.
If you need to get information from the site you can either add an ajax access, or json end point in your code for that.
Related Posts:
- Check if row exists before inserting
- Which action does wp_update_user triggers?
- Wp_query function to search from product_title ‘OR’ product tags name
- Is there a WP function to get taxonomy name from taxonomy_term_id?
- Accessing two databases wordpress
- Get the alphabetical sorted data with wpdb
- How can I connect to a second database and still be able to use wp functions like get_post_types()?
- Enable accessibility mode in widget as default
- Writing a function for WP Cron to run a SQL command daily
- sort title descending with title with number
- Delete oldest wordpress post (SQL query)
- Function returning queried meta value based on current post ID
- How to add next height number in Order Attributes inside the Add new page. [duplicate]
- WPDB query suddenly not working
- What’s the difference between esc_html, esc_attr, esc_html_e, and so on?
- Check if post is being published for the first time, or is an already published post being updated
- Is it possible to rename a post format?
- Is there a hook or function I can use to display all theme files being used on a current page?
- How to paginate the get_users function?
- How can I remove the title “leave a reply” in the comment box in twentyeleven?
- Child theme – overriding add_image_size by a child theme [duplicate]
- Check if has any sidebar active on current page
- Login using the password from protected pages
- Remove tag on my RSS Feed
- Automated mark posts as featured every day
- Enqueuing External Javascript functions.php
- Child Theme Not Overriding Parent Theme
- Function to wrap the_content in a div
- How to run a function once on every post in database?
- Date/time limitation of posts where function must be executed
- Custom image size in Media Dropdown
- Trouble using antispambot()
- Polylang: pll_e() & pll__() on functions.php, doesn’t work
- Post Pagination Showing Same Posts Every Page
- How to filter a table in post content without plugins? [closed]
- Inserting a functions output after the content
- Having issues with a foreach inside of a shortcode with ACF gallery
- Don’t delete a page if it holds users
- Is there an alternative to get_template_directory_uri()?
- Word Press – Dynamic Content [closed]
- Change label for registration Fields
- Warning: : DOMDocument::loadHTML(): Empty string supplied as input in functions.php when adding classes to post images
- Remove stylesheets from Campaign Monitor plugin
- How to do set post permalinks using 6 digit random unique function?
- Get page id or status by private pages?
- Categories as main menu items and subcategories as nested lists
- woocommerce change currency per category [closed]
- I can’t enqueue my scripts – They literally aren’t being added to my site
- Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)
- Multisite 404 on pages – rewrite error breaks database
- Make wp_link_pages() suitable for Twitter Bootstrap markup
- I can’t seem to install Font Awesome locally [closed]
- Prevent custom field from being updated after first publish
- laoding bloginfo url in function array?
- How to edit classes in body tag?
- problem loading stylesheets to wp_head dynamically
- Add a field into a shortcode of an extension
- Need a method to prevent WP from adding in between my shortcodes
- How to edit/replace Parent functions.php function in Child Theme to add “Walker” class
- Load scripts for do_shortcode( ‘ [ my_shortcode ] ‘ )
- get_terms and meta_value results blank
- How to modify get_the_excerpt() when post-format equals ‘quote’?
- New checkbox in custom widget isn’t saving data
- Post to category based on email domain, for a post-by-email plugin
- Featured Image keeps cropping
- struggling with syntax for the_post_thumbnail();
- Echo youtube code from url or shortcode
- Woocommerce Default sorting product by product type
- Displaying registered sidebar after post content
- Create a CUstom Archive by Year, but just for a Single Category
- Malfunction via Safari [closed]
- Is it possible to limit number of files a non-admin user can upload via the WordPress media library?
- Does hook have an effect on increasing the page load?
- Adding a schema code to one specific page using functions.php file
- Multiples functions on customize_register?
- Can I call a functions.php file from a different URL?
- Javascript file loads only on homepage, not on other pages (404 not found error)
- price of product can’t return when get data of product in functions.php
- Can You Set A Minimum Image Dimension For Resizing Images?
- Getting value of variable from functions.php and debugging it
- use add_action in a shortcode (gravity form – WordPress)
- Creating a “Related Meta” type field?
- Modified functions.php in Magazine Pro theme of Genesis. 500 error
- require_once() Causing categories and tag pages on dashboard to not refrsh
- Display ads on post in a particular category
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- Help with is_page() and calling css for specific pages in a Child Theme
- Post date on Custom field
- Fatal error: Call to undefined function add_action() – an untouched problem
- Author info does not show up when author has no posts
- Load CSS conditional on custom field is present
- Modify sub_menu function to show pages below a specifically set page
- Add custom class to all URLs on entire site
- Functions.php in child theme that loads CSS file breaks website
- Unregistering custom tinymce plugin?
- Combining wp_current_user() and a variable
- Init hook for header send
- Change conditional tag in wordpress without editing the core files
- site_url is not honoring scheme
- Get all users from role and add to dropdown (select) – wordpress, javascript