The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
117 views

Load content From Include File within plugin

The title isn't the best, so feel free to change it to make it more clear... Problem: I am trying to load up a page from within a plugin and replace anything that WP puts out. Have it set so if they ...
0
votes
1answer
60 views

Dynamically determine URI to scripts and styles included with a class which could be added from plugin/theme/child theme/mu plugin

I'm working on a settings API class which I'd like to be able to drop into a plugin, wpmu plugin, theme, or child theme directory, and have it just work. My issue is that I'm having trouble figuring ...
0
votes
2answers
873 views

Wp Enviroment problem with included file

i have a file i am including across site to index.php, single.php etc. This file behaves really strage and acts like it not part of wordpress Enviroment meaning: i get errors on ...
0
votes
1answer
3k views

query_posts doesnt show pages with given ID when post_type => page

At the moment I am working on a WP-site, which on the frontpages has 3 excerpts of other pages on it. The code I am trying to use for this is as following: <?php query_posts(array('post_type' ...
0
votes
1answer
1k views

including Zend Gdata library path error

I'm trying to include the Zend Gdata module into a plugin, but this error appears on plugin activation: include_once(Zend\Gdata\YouTube.php) [function.include-once]: failed to open stream: No such ...
0
votes
1answer
262 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
153 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?
1
vote
2answers
2k views

Order by & include array by specific post ids

I have the following: <?php $num_cols = 2; // set the number of columns here $args = array( 'post_type' => 'testimonials', ...
0
votes
1answer
1k views

How to check if txt file exists inside template folder?

I have a folder inside my theme where I hold some txt files which I am including in a theme. The problem is that before including txt file I need to check if it does exist. I fail checking it the ...
1
vote
2answers
3k views

Include a specific page in your template

How do you include specific pages into a template? Like for example on my websites main page I want to have about 3 different content areas that the client can regularly update as he needs to. I ...
0
votes
2answers
1k views

Is it possible to include an HTML flat-file website inside a WordPress theme?

Is it possible to include an entire flat-file HTML site (.html, folders/ and CSS) inside WordPress? Essentially, I want to host an HTML site, but have access to WP functions and plugins. Not to ...
1
vote
2answers
1k views

WordPress “include TEMPLATEPATH” or?

I built something like this: Index Container Widgets Area and I created a widget for that - Categories Widget - Index Container .php with this in: <?php include (TEMPLATEPATH . ...
0
votes
1answer
575 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 . ...
0
votes
1answer
263 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 ...
0
votes
2answers
5k views

Firebug says jQuery is loaded but $() and jQuery() are not defined

I'm trying to test my wordpress page with some simple jQuery script but it won't work. I've loaded the script with wp_enqueue_script('jquery'); in functions.php as explained in the wordpress guide ...
2
votes
2answers
1k views

Show certain terms from custom taxonomy but exclude 'parent' terms?

I have a custom post type "mycustom_products" (hierarchical) that has custom taxonomies called 'categories' and 'tags' (as many other custom post types do). My custom category is called ...
1
vote
2answers
589 views

What's the correct way to include files in Wordpress TwentyTen theme with it's own jquery scripts and css?

I want to include a slider in the default Wordpress theme on the home page. I did manage to get the page to show using <?php if ( is_home() ) { include ('slider.php'); } ?> but it doesn't look ...
0
votes
1answer
136 views

strange parse error when including a loop template within another template

I have a loop template called loop-event-details.php where I have code to display each event. My main page template is called events-page.php. I use the following code to include the loop template: ...
0
votes
2answers
1k views

confused about wp_list_pages() function - how to display selected top pages with all their subpages

I'm a bit confused about wp_list_pages() function. Lets say I have 3 top level pages (with no parent) and each of them have some sub-pages: page 1 [sub-pages: 1.1, 1.2, 1.3]; page 2 [sub-pages: ...
1
vote
1answer
749 views

If a page does not exist, include a different page?

I'm setting up a website for a client where they want several different sections, like so: Regular Site (/) - Section 1 (/section_1/) - Section 2 (/section_2/) ... - Section X The ...
1
vote
2answers
588 views

Including an External File in a Post (and Using Processed Paths)

I have a post that includes a relatively large table that gets updated frequently. Instead of using the (slower) web interface to update the post each time, I installed one of the “run PHP” plugins ...
0
votes
3answers
607 views

Looking for a way to include/embed text from a file on a page so that the short codes are processed

I'm using WP as a CMS. I've got multiple pages that share the same header. group 1 has header 1. group 2 has header 2. etc. I've looked at these two plugins for a quick way to insert a combination ...
2
votes
3answers
567 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 ...
27
votes
4answers
13k views

Passing Variables through locate_template

While I've typically used include or require on their own to save long term code maintenance I've started to use get_template_part and locate_template as using built in WordPress stuff is always best. ...