The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
38 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
812 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
55 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
452 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
142 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
279 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
813 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
2k 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
110 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
763 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
224 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
132 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
949 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
10 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
15 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
10 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
14 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
26 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
18 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
47 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
122 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
305 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
47 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
133 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
1answer
514 views

<?php 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
61 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
47 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
38 views

add_action inside include

I have the following include in a plugin class function: include( plugin_dir_path( __FILE__ ) . 'templates/fancybox-player.php'); I have in this include the following code: // Load js and ...
0
votes
0answers
23 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
184 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
71 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
122 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
23 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
81 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
104 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
113 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
268 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
56 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
474 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
253 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
1answer
131 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: ...
-1
votes
1answer
353 views

Adding a wp_head hook from an included PHP file

I am using a WordPress plugin for including PHP code within posts and pages, and it's working great - however, I need to insert some styles and scripts, and in order to do that, I need to add a hook ...
-2
votes
3answers
44 views

Shortcode return is printing a 1 afterward

function build_total_search_method( $atts ) { $shorcode_php_function = include( dirname(__FILE__) . "/includes/total_search.php" ); return $shorcode_php_function; } add_shortcode( ...
-2
votes
0answers
8 views

Exclude or Include page with metadata value from wordpress search

Is there a way to exclude or include page with metadata value in wordpress search?
-2
votes
1answer
316 views

How to define category ID in an array?

I have the following: <?php if ( array( 'is_category', 'is_tag' ) ) { ?> What I want to do is (that doesn't quite work): <?php if ( array( 'is_category('13')', 'is_tag' ) ) { ?> So ...