The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
134 views

Should I use include or load_template for including shortcodes, plugins and so on?

I am wondering what is the right way to include additional php files for theme options, shortcodes, plugins and so on. Both load_template and include will work, but what has better semantic value? ...
0
votes
1answer
129 views

Three step order form, how to go to next step

I have an order.php that is in fact a custom page template. This template loads the first step of my order form via: <?php include('order/order-step-one.php'); ?> Now in this ...
0
votes
1answer
40 views

Is it ok to chop index.php and include files?

So in my index.php I called get_header(), get_sidebar() and get_footer(). My index.php is kind of huge. It is separated into 5 divs more. How do I make it cleaner? Is it safe to chop it to files and ...
0
votes
3answers
1k views

Adding rich text editor to my plugin

Hello Wordpress users, I'm trying to add a rich text editor to my own plugin. So I googled it first of course and I found serveral answers like: ...
0
votes
1answer
69 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
506 views

Creating plugin using simple_html_dom parser?

I'm running into a problem with my plugin which is essentially an admin page that includes simple_html_dom parser to edit some information scraped from some websites. Let's assume I want to parse ...
0
votes
3answers
77 views

How and when to include shortcode source files

I am Writing a plugin, with many shortcodes. Now I do not want to include all shortcodes source files to every page. So my questions are: Where should I include the source? Is it back-end or ...
0
votes
1answer
143 views

Include multiple custom post types [closed]

Hi i want to include 2 different custom post types in my functions files: include("portfolio/portfolio-post-type.php"); include("gallery/gallery-post-type.php"); But they seem to break ...
0
votes
2answers
293 views

Include doesn't work, getting strange path: (/usr/local/php53/lib/php) - Whats wrong? (WPAlchemy)

I´m using WPAlchemy which is a helper class for metabox creation. I´m trying to include it through my functions.php but I´m getting strange errors when I have WP_Debug set to true. For some reason ...
0
votes
2answers
987 views

Using plugin_dir_path() with WordPress on MAMP

I have the following directory structure: Root Install: /Users/philipdowner/Sites/montanaliving Within the root installation I have the following plugin structure: ...
0
votes
2answers
3k 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 ...
0
votes
1answer
31 views

add_feed failed to open stream

Trying to add a new feed with: function events_feed() { include(TEMPLATEPATH . '/events.php/'); } add_feed('gpevent','events_feed'); And I'm getting a failed to open stream directory not found ...
0
votes
1answer
60 views

Include file in plugin file

I have a working plugin with many functions in it. I want to break the plugin into several file. I removed some functions and place it in a file called activate.php k7Course.php. Then in the file ...
0
votes
1answer
113 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
2k 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
879 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
243 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
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 ...
0
votes
0answers
33 views

Prevent include script twice (wordpress importer)

I created my own demo installer but I have some difficulties to correctly load wordpress importer without conflict. I tried to get the page parameter on page load. If the admin url have 'page' ...
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
1answer
24 views

How to include a post type in the admin/backend?

I'm changing the backend/admin and want to show a div above the pages. How can I include the pages like the example; <?php include('./tools.php') ; this works but when I choose edit.php / ...
0
votes
1answer
30 views

Pages included in another page and duplicate content issues for SEO

in a recent project I've decided to create a page template (PageX) which is a kind of "stack" of subpages. This template simply includes the content of three other separate pages (PageA, PageB, ...
0
votes
0answers
17 views

Cant create table if including the file in main script

I want to create a table by including the script that creates it in the main plugin file. I have this: register_activation_hook( __FILE__, 'vkrwps_agt' ); function vkrwps_agt() { global $wpdb; ...
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
0answers
15 views

Linefeed added after include/require in PHP

I am using the following script to protect downloads from the wp-upload dir: (https://gist.github.com/hakre/1552239) It should work fine, however there is a linefeed created by the ...
0
votes
1answer
29 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
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
0answers
66 views

Custom plugin breaks css.php on Multisite

I got a strange problem on a Multisite Install I run. Everything works perfectly fine (Domain Mapping, Caching, whatever functions and Plugins I use, both forced and chooseable). To enhance the ...
0
votes
0answers
10 views

How to include taxonomy.php from wp-includes the proper way? [duplicate]

I tried including taxonomy.php from wp-includes folder in my custom php script (which is called by jquery) but I get this error: Fatal error: Call to undefined function add_action() in ...
0
votes
1answer
209 views

Include content from one page to another

I'd like to include content from one Page (named "contact_text") to another Page in a specific spot (both of these are WordPress admin pages). I've followed this Stack Overflow thread. However I ...
0
votes
0answers
336 views

show Visual form builder in the front end

Iam anew in wordpress . i used this plugin http://wordpress.org/plugins/visual-form-builder/ to build custom pages then i tried to build a custom page called formbuilder.php to use it in the front end ...
0
votes
2answers
48 views

Undo a function that is not (seemingly) hooked to an action?

I am using the popular Disqus plugin. To use this plugin effectively, they advise you to change the URL on the front page to end in #disqus_thread. I know how to easily do this in jQuery, but I ...
0
votes
2answers
191 views

How To Display Selected Terms For Custom Taxonomy?

This may be a syntax problem but if so I can't see the problem. I want to select specific terms of a custom taxonomy and display their names. I'm having a problem with the selection process in the ...
0
votes
2answers
844 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
75 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
49 views

Include paths and functions for external scripts

I try load external script as plugin , the idea it´s use one easy plugin and call script and load this script into admin but i have problems with some configuration files and css files , in the case ...
0
votes
0answers
24 views

Insert blog template on home template [duplicate]

i need to include "blog_page_2_column.php" into homepage. I insert this into homepage template: <?php include(TEMPLATEPATH . '/blog_page_2_column.php');?> Works fine but i cant change the ...
0
votes
1answer
234 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
1answer
74 views

post content includes and seo vs. duplicate content

Trying to find the answer here but can't seem to locate this specific scenario... We have products that include multiple, defined resources - for example, each has 3 distinct user guides for ...
0
votes
1answer
132 views

Add page as static html into another page

Is there a way to include a wordpress Page into another one? I'm not just talking about getting the content using get_page(), but to import the whole page (theme + content). I have been looking around ...
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
97 views

Want to include ad code after related post

I want to include ads HTML code after related post plugin. My site my single.php code below: <?php if ( ...
0
votes
1answer
113 views

Custom meta box includes

I am having some problems including files for my custom meta boxes. I have a structure like so: post-meta.php cmb teaser_meta_box load.php initiate.php display.php save.php So ...
0
votes
2answers
117 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
526 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 ...
0
votes
1answer
57 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
1answer
519 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
258 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 ...