The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
527 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
260 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
580 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
134 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
724 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
544 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
544 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
553 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 ...
25
votes
4answers
12k 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. ...