|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
wordpress help
tried this over at WP support but nobody answered...
all i want to do is create external variables (string variables - no database calls) in a php include file and be able to use them within the WP template. so, i have variables.php Code:
<? $variable1 = "Hello World"; $variable2 = "How R U?"; $variable3 = "Need Answers!"; ?> then, i want to take variables.php and insert into wordpress code somewhere where all pages in wordpress have access and can use all the variables through echo statements... Code:
<?
include('variables.php');
?>
Please help! thanks. jnm |
|
#2
|
|||
|
|||
|
RE: wordpress help
Why not just put your include line into the config.php file? Every other file within WordPress calls it.
|
|
#3
|
|||||
|
|||||
|
RE: wordpress help
When you doing something like this, you must edit original WP code. It isn't good way to resolve any problem. In my opinion you should make function like this
php Code:
and put it into your script like plug-in. advantages: - you have original WP code - you add to name-space only one function - you can easy change variables in one place - you can also easy disable this - you can use non-exists variables and it still works |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Applications > wordpress help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|