Tagged Questions
0
votes
1answer
35 views
file.php not loaded?
I feel like I'm being really stupid.
I want to make use of some functions in wp-admin/includes/file.php (like download_url), but it doesn't seem to be included, not in the dashboard/admin, or in the ...
0
votes
1answer
72 views
Custom metabox not working
Morning!
I have a call in my functions.php file to include a custom meta-box php file in my theme's directory called: /metaboxes/home-meta.php
The code is as follows for the call:
add_action( ...
0
votes
2answers
70 views
Including a PHP file via a function that is part of a plugin?
I struggled with this all day, and now am here...
I have a contact form generated by including a php. Presently, I have this code in my theme's index.php to include it:
if ( is_page('contact') ) {
...
0
votes
1answer
58 views
How to include a plugin's php file to another plugin functions file
I need to customize the output of the shortcode of plugin A by using a function of plugin B. So I alter the shortcode function of plugin A by inserting a condition to check the value of the function ...
2
votes
2answers
218 views
What is the most efficient method for loading widgets in functions.php
I have seen WordPress developers use two different methods for loading custom widgets from the functions.php file.
The first:
include("functions/my-custom-widget.php");
The second:
...
0
votes
2answers
1k views
Calling a Function in Functions.php from an external PHP script
Preamble
I tried to make sure this question was not asked before. I'm new to using StackExchange so I may have failed in doing so. I don't mind rebukes; thick skin and I learn fast :)
THE PROBLEM
I ...
1
vote
2answers
2k views
Include PHP file in Content using [shortcode]
Here is what I have
I am not having any lucking finding how to simply include a file in the content editor using a shortcode.
For Example if I wanted to include form.php inside my Contact Page how ...
0
votes
1answer
185 views
How do I call an external php non WordPress class into functions.php?
All my WordPress files are in:
/httpdocs/news/
and the classes I want to call are in:
/private/classes/
Would I use the include_once() function or is there a WordPress function? And how would I ...
0
votes
1answer
298 views
can't access some worpress function from my plugin
I'm trying to write a relatively simple plugin. I have two php files, one is included within the other like this:
define( 'PLUGIN_DIR', dirname(__FILE__).'/' );
include_once(PLUGIN_DIR . ...