The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
29 views

Occasional include / require_once fatal errors

I've been noticing a relatively rare occurrence with WordPress installs on one dedicated server. Once in a while a page will fail to load due to a PHP fatal error for trying to include or require a ...
0
votes
0answers
16 views

template_redirect and title

I pass a template_redirect in wordpress as hook but I want to have a personnalized title for this page and I miss to do that. Has someone any idea ? add_action( 'template_redirect', 'virtual_pages' ...
0
votes
3answers
46 views

Include files in child themes, declare in functions.php

I'm using a child theme. I want to make a change to a file which currently resides in: mybasetheme>includes>sf-content-display>sf-post-layouts.php So I copied the exact same file structure into ...
0
votes
1answer
18 views

Variable scope producing undefined variable notices in included files

I'm building a Wordpress Theme and on the front page the user is able to select how they would like to order their posts. I've then created two functions that take the users selection through the ...
0
votes
1answer
18 views

Include Category With Tax Query

I'm using The Events Calendar plugin but I thought I'd post it here as I believe this particular function works the same as get_posts(). I'm trying to use the function to display only posts from one ...
0
votes
1answer
14 views

Include post on external custom site

How do I include single post ( I mean image, title, and a bit of text ) on my own custom site? I have wp in subdirectory and I just want to make "Recent article" box on my site. I was looking for it 2 ...
0
votes
3answers
234 views

After Migration, Warning: include_once() errors on all pages

We migrated our site to a new host and changed the domain name, and now all pages are displaying errors: Warning: include_once(includes/class-wc-download-handler.php) [function.include-once]: ...
0
votes
1answer
32 views

add_action outside a plugin

I'm trying to create my own class to make some of the most common changes I need in all my WP sites. Things like removing the canonical tag when not required or changing the meta description. I'm not ...
0
votes
1answer
23 views

Hardening wordpress: blocking /includes with htaccess

This page http://codex.wordpress.org/Hardening_WordPress says this should be included in the .htaccess file to block requests for files inside the includes dir. # Block the include-only files. ...
0
votes
1answer
32 views

Incorrect search results in search.php – issue triggered by using `define('BodyID', 'search'); the_post();` in search.php

I have a problem where the page title is not picked up in search results. I've narrowed the problem down to the following line of search.php in my custom theme. define('BodyID', 'search'); ...
0
votes
1answer
18 views

Include inside sidebar

Is it possible to include a file inside or inbetween items in a sidebar? Here are the two functions being called: <?php get_sidebar(); ?> <?php get_template_part('testimonial-box'); ?> ...
0
votes
0answers
50 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
35 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 ...
-3
votes
2answers
45 views

php include returns 1 as output with other outputs [closed]

I have this code $return = include(TEMPLATEPATH . '/apex.php' ); $html .= $return; I using the above code to get a php for from a plugin from theme dir. but it returns 1 with the other wanted ...
0
votes
0answers
39 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
34 views

How to include core files into plugin

I did some search about this but I don't realize which is the correct way to include a wordpress core file into a plugin. I wish to include the wp-includes/ms-funcition.php file. For example if I ...
0
votes
1answer
29 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
2answers
95 views

Conditionally include files in functions.php?

I have a bunch of functionality being added to a Wordpress site including files in functions.php but I'm worried about performance. All of these files are included for every page request and not all ...
1
vote
1answer
77 views

include php file if page_id matches

I think this is a simple question: I'm building a plugi, and up until now, if i wanted to include a php file, i would have to know the page_id - i would put the following command in page.php (or ...
0
votes
1answer
35 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
18 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
17 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
16 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
32 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
49 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
24 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
79 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
1answer
49 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
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
45 views

How to query posts to include specific pages of one post type, and all pages of another post type?

I'm having trouble figuring out how to query all posts from the post type "events", as well as including four specific pages in the loop. If I use the "include" parameter, it only returns the ...
0
votes
2answers
60 views

Including php file in directory above WordPress installation

I'm having trouble including an external .php file into my WordPress theme. WordPress installation URL: mydomainname.com/blog PHP File URL: mydomainname.com/testing/assets/inc/analytics.php I'm ...
0
votes
1answer
282 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
1answer
616 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
178 views

Issues with wp_enqueue_script and jquery-ui

wp_enqueue_script('jquery-effects-shake'); ..doesn't seem to work, no matter where I put it. I've tried the following and lots of googling: function my_callback() { ...
3
votes
2answers
107 views

How can I avoid code duplication for a blog with lots of source code?

I'm writing a tutorial on using the R language to do some applied statistics. An example post is: http://mcmcinirt.stat.cmu.edu/archives/223 I would like to have all of the blocks of source code be ...
0
votes
1answer
55 views

What is the right way to include a wp-admin file in your theme?

I'm trying to use wp_delete_user() in my theme, to allow a user to delete their account from the front-end. Turns out that the wp_delete_user() is not defined unless /wp-admin/includes/user.php has ...
0
votes
0answers
352 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
1answer
65 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 ...
0
votes
2answers
228 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 ...
1
vote
1answer
162 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? ...
1
vote
3answers
7k 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 /* ...
2
votes
3answers
3k views

How to prevent wordpress from loading old versions of jquery in wp_head();?

I noticed my twenty twelve theme is including outdated versions of jquery and js so I want to replace the scripts with the newer versions, however the scripts are in the file included by wp_head() ...
0
votes
2answers
1k 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 ...
-3
votes
1answer
2k views

How to rename wp-includes folder?

Is there a way that we could rename wp-includes folder I have found out there are ways to do for other folders. But how do we do it for wp-includes folder? ...
0
votes
1answer
96 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 ...
2
votes
1answer
212 views

Why does including a file in theme's functions.php not work?

For example, if I write some code (e.d. add a custom post type or something) in my theme's functions.php, it works fine. If I move it to a new file, then include() the file in my theme's functions.php ...
0
votes
1answer
137 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
141 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 ...
0
votes
1answer
50 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 ...