0
votes
1answer
32 views

How do I / Is it possible to execute an external PHP file / function inside Wordpress?

On my set-up, there is the regular website which consists of a header and content (both printed from separate PHP files located in domain.com/includes/) and a Wordpress blog based in a subdirectory ...
0
votes
0answers
30 views

Question about file path for include/require methods

So I am currently rather new to Wordpress development and I had a question about the file path for the include() and require() methods. I have a php script within my Wordpress installation that I ...
0
votes
0answers
15 views

including php file from payment gateway

I'm implementing a payment gateway called point, is a Swedish company. Everything is fine with this files, because I already tested outside of wordpress.<> But now that I'm implementing this on ...
0
votes
1answer
30 views

Include a php file that is above WP installation hierarchically?

I've come across a number of ways to call the WP "root" folder But what if I want to include a php file that is in a parent folder of WP? Example http://www.site.com/, where the WP blog is in ...
0
votes
1answer
43 views

PHP help get_template_directory + PHP include

Sorry my PHP skills are lacking. I want to use a php include in WP but I'd like to get the file path with <?php get_template_directory(); ?> I can't figure out how that would look. My non WP ...
0
votes
1answer
23 views

How can I include a file related to blog URL? Nothing seems to work

When I was building my website locally using WAMP, I was just using simple include '/extras/file.php'; Of course, that would start at the root folder, and look in the extras folder. However, now ...
0
votes
1answer
48 views

Include a file that has a function in it

I am using include 'filename.php' to load a php file into a template file, simply because the original PHP template file was getting huge and I wanted to split up the sections into different files for ...
0
votes
1answer
486 views

ob_get_clean returns empty string, ob_get_flush outputs string

I am utilizing a template-type system, to filter the_content. My filter contains this partial code: ob_start(); include_once ( self::$dir . 'views/templates/' . $post_type . '/' . $display . '.php' ...
0
votes
1answer
60 views

Trying to include files in plugin isn't working

I've created a simple site specific functions plugin but I'm having some trouble including additional files to it. Basically I'm trying to keep things separated so I've got one php file for general ...
1
vote
3answers
4k views

Include a external PHP file into a Wordpress Custom Template

Is this even possible? I mean, im trying to add a blog into my site.. I already have the header,footer and sidebar layout in my site. can i use those in my custom wordpress template? <?php /* ...
0
votes
2answers
863 views

the_author() not working outside the loop

I have the following code on index.php and I want to include this line of code (bellow) to display author info on top of the loop. <?php include 'author-top.php'; ?><!--author--> I ...
0
votes
1answer
77 views

ERRORS! include() [function.include]: Failed opening

After migrating my site from a development server to the live site, I'm getting a massive amount of PHP errors. None of these were apparent on the development site. http://www.martialartsevents.ca ...
0
votes
1answer
125 views

php include not working in custom page

The Problem I have a db.php file which contains mysql login details. I want it in a separate file like this so it can be linked in several different pages for easier tracing later. This all works ...
2
votes
1answer
75 views

nowplaying.include.php Will Not Display Results

Cyberchimps.com recommended I post here as they believed there may be a global issue with my request. I thought what I was missing was obvious and simple, but two months into this and being referred ...
0
votes
2answers
53 views

Post's ID pattern?

Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID's not being incremented by 1 every posts? It would be easier..My ID's go from 9867, to 9869, to ...
0
votes
1answer
24 views

Wordpress blog set up

I plan to launch my website with multiple blogs plugged into it, with a main index page for all posts. I currently have the index running from the root and two blogs running within their own folders ...
0
votes
1answer
35 views

Why does abstracting html from plugin code result in loss of access to wordpress functions?

When defining the callback that produces the HTML content for an admin settings page, I'd like to abstract the HTML into a separate file, but the HTML uses some wordpress functions, specifically ...
0
votes
2answers
119 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') ) { ...
2
votes
1answer
672 views

integrating external php library into wordpress- the right way

If I were to load a custom library into wordpress, what would be the best place to add it? Since there are a bunch of global vars defined at the top of the library, I would not want that to be done ...
0
votes
1answer
244 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
2answers
140 views

Using WP functions such as the_title() in an included php file

I'm including a php file in single.php, in the loop. Is it possible to use WP variables such as the_title(), the_date(), etc in the included php file?
0
votes
1answer
259 views

What's the best way to include php code in to pages?

I'm currently creating a bunch of (empty) pages and performing conditionals such as is_page('Blabla') on it, which increases my page.php significantly. I'm already using require_once for different ...
2
votes
3answers
549 views

where to include a php file

I have a php file with some variables which I would like to use. When I include it in the header.php the variables in that file are not recognized at footer.php and some other places. Where is the ...