The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
40 views

Shortcode not passing variable to included file

I set up a shortcode which includes a standard php/html form file. In the form I have a hidden field where the value is a variable which is meant to be available in the form via the shortcode ...
0
votes
0answers
14 views

Includin WP outside the loop but not all function are working, why?

I have to deal with a strange setup, where i have a subdomain (non-wp) and a domain.com (wp). I need the wordpress data to be available in the submdomain so i add ...
0
votes
1answer
52 views

wp_star_rating() - Adding a 5 star rating system to theme

My goal is to add a 5 star rating system to my theme. I read that there's a function wp_star_rating in wp-admin/includes/template.php on line 2121, that I've been trying to use for the ratings. I am ...
0
votes
0answers
34 views

path-based multisite: Including wp-load.php in external page redirects page to blog

I have a multisite setup at foo.com/school/blog. Now when I try to include wp-load.php on bar.com it redirects the page to foo.com/school/blog. bar.com is an ad on domain and points to foo.com/test. ...
0
votes
0answers
16 views

sharing wp-include - wp-admin on same installation

This is not a security or privacy issue.. I have multiple wp installations (usually a couple for project), so in the next installation I'll be setting up I'm thinking of cutting down some space ...
0
votes
1answer
20 views

Theme parts path location dump

Few months back I was working on customizing theme that I was assigned to. I remember that I used some function or define something in the config or theme functions file and than it displayed debug ...
0
votes
1answer
37 views

How to pass variables with get_template_part?

I am developing a custom theme and i like to pass some variables to selected files. I am calling the view files from functions.php. $var1 = ; $var2 = ; etc ...
0
votes
2answers
34 views

wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file

I made a plugin and trying to install on wordpress.org but Wordpress is giving me error message that ## Calling core loading files directly is incorrect. I am using a cron file in my plugin.This cron ...
0
votes
0answers
28 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
187 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
72 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
31 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
28 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
487 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
56 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
32 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
48 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
22 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
73 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
48 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
65 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
68 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
84 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
48 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
178 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
104 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
43 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
20 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
20 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
18 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
33 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 ...
1
vote
1answer
69 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
25 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
94 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
52 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
51 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
68 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
2answers
406 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
862 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
193 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
120 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
94 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
386 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
50 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
75 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
268 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
219 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
10k 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
4k 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() ...