The include tag has no wiki summary.
0
votes
0answers
20 views
Insert blog template on home template
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
0answers
11 views
I need to include post template into home template
i need to include "blog_page_2_column.php" into homepage.
I do this, insert this
into homepage template, works fine but i cant change the page of blog...
Any idea?
The web is ucrburna2013.com.ar
Thx
0
votes
1answer
20 views
is_plugin_active() returning false on active plugin
So I have the following in an include in my theme file:
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( WP_PLUGIN_DIR . '/woocommerce/woocommerce.php' ) ) {
...
0
votes
2answers
3k 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
1answer
25 views
nowplaying.include.php Will Not Display Results
Cyberchimps.com recommended I post here as they believed there may be a global issue with my request. I thought what I was missing was obvious and simple, but two months into this and being referred ...
0
votes
2answers
762 views
Order by & include array by specific post ids
I have the following:
<?php $num_cols = 2; // set the number of columns here
$args = array(
'post_type' => 'testimonials',
...
0
votes
1answer
25 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
1answer
61 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
2answers
30 views
Post's ID pattern?
Each post has an ID and I would like to know how they were assigned. Is there a pattern? Why are the ID's not being incremented by 1 every posts? It would be easier..My ID's go from 9867, to 9869, to ...
1
vote
1answer
103 views
ABSPATH not working! Any idea why?
This is what in my wp-config.php :
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
I am calling from plugin/pluginName directory to :
require_once( ABSPATH . ...
0
votes
1answer
35 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
51 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
0answers
41 views
shortcode with external file is showing twice [closed]
I have problem on short code activation in my custom plugin. The included file it's shows up twice.
class Configurator{
public function __construct()
{
add_action( ...
0
votes
1answer
70 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( ...
6
votes
3answers
193 views
Is there any way to use get_template_part() with folders?
I'm wondering if there is any way to use get_template_part() with folders? My main folder has a lot of files now because I put every re-usable element in a separate file. I'd like to put them in ...
-1
votes
1answer
45 views
It is posible to include echo output value? [closed]
I try to show header.php file with include(). In theme administration, I made it 2 options: header.php and headerbreak.php. Using shortcodes like $he_header, I try to include($value) like this:
...
-2
votes
3answers
40 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( ...
0
votes
1answer
75 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
200 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
1answer
20 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 ...
15
votes
3answers
6k 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.
...
0
votes
3answers
60 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
289 views
bloginfo('stylesheet_directory') vs. get_stylesheet_directory_uri() and include('file.php') vs. get_template_part()
In my custom theme I'm using <img src="<?php bloginfo('stylesheet_directory'); ?>/images/logo.jpg"/> to load my custom logo.
I'm using a custom sidebar for front-page.php and that's why I ...
0
votes
1answer
20 views
Why does abstracting html from plugin code result in loss of access to wordpress functions?
When defining the callback that produces the HTML content for an admin settings page, I'd like to abstract the HTML into a separate file, but the HTML uses some wordpress functions, specifically ...
0
votes
3answers
315 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
1answer
126 views
Conditional Ajax inclusion
I have a custom interface that uses 30+ ajax files while running...
some files are only used in category.php while othere's are only
used in page.php...
i include the ajax loader php files in my ...
0
votes
1answer
57 views
want to include ad code after related post
i want to include ads html code after related post plugin. my site http://www.dewdropzone.com my single php code below
\
<?php ...
1
vote
1answer
61 views
Include files for a plugin not including
I have a plugin which I need to include a file in but it doesn't include.
Here's the example of the tree:
plugin folder
/themes
/folder2
/somefiles
/includeme.php
Within themes is
...
1
vote
1answer
240 views
Sort users in get_users() in custom order
<?php
$blogusers = get_users('include=5,6,2,7,12,8');
foreach ($blogusers as $user) {
...
}
?>
Right now these users will sort by first name. How do I sort this the order the numbers ...
0
votes
1answer
82 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 ...
1
vote
0answers
38 views
Jetpack breaks including post (via permalink)
On another website, I've been dynamically including posts <?php include '[post].php' ?> via the permalink, from my Wordpress site. I recently installed the Jetpack plugin for my Wordpress site, ...
2
votes
2answers
75 views
I need to add a custom “cover” to every new post — plugin or custom setup?
I'm creating a site that's basically like an online book, and every post is a chapter. Each chapter gets a customized, specially designed "cover" page that can't really be designed in the Wordpress ...
0
votes
2answers
68 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
79 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 ...
1
vote
1answer
427 views
passing argument to get_template_part() or a better way to code
I have this include … event-list.php
<?php
/**
* The loop that displays upcoming events
*/
?>
<ul class="event-items">
<?php
$yesterday = time() - 24*60*60;
$args = array(
...
-1
votes
1answer
160 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 ...
0
votes
1answer
58 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
501 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
2answers
161 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 ...
2
votes
2answers
205 views
What is the most efficient method for loading widgets in functions.php
I have seen WordPress developers use two different methods for loading custom widgets from the functions.php file.
The first:
include("functions/my-custom-widget.php");
The second:
...
0
votes
2answers
319 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
530 views
How can I include JavaScript that use jQuery on admin side
I try this:
add_action('admin_print_scripts', 'custom_admin_scripts' );
function custom_admin_scripts() {
echo '<script type="text/javascript" src="' . get_bloginfo('stylesheet_directory') ...
1
vote
3answers
2k views
Include a specific page in your template
How do you include specific pages into a template?
Like for example on my websites main page I want to have about 3 different content areas that the client can regularly update as he needs to.
I ...
-2
votes
1answer
202 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 ...
5
votes
5answers
2k views
Including jQuery and jQuery files the correct way
I´m having some trouble with this. I´m not sure how to do it the correct way, and I read so many different techniques and ways to do it that I dont know what to make of it.
Some questions and ...
0
votes
2answers
1k 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
2answers
240 views
include wp-blog-header not working on MAMP
To clarify my question...
My plugin is/was using AJAX to call the file pluginname/submit/pick.php My pluginname/pluginname.php contains the usual plugin header and wordpress automatically finds it.
...
1
vote
2answers
2k views
Include PHP file in Content using [shortcode]
Here is what I have
I am not having any lucking finding how to simply include a file in the content editor using a shortcode.
For Example if I wanted to include form.php inside my Contact Page how ...
0
votes
1answer
26 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
82 views
PHP files included within functions.php don't work from admin area
I've split my functions.php into multiple files using require_once, which works perfectly. However when I add admin functionality (extra panels) in one of the included files, it doesn't work? It's ...

