Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

0
votes
1answer
78 views

/wp-admin/post.php shows 404 template on submit

When I publish or save a post, I see the 404 error page from my template. This happens with posts and WooCommerce products. I'm using the Twenty Twelve theme, and I have the following plugins ...
2
votes
5answers
875 views

How to force TinyMCE in WodPress to replace newlines with <br> tags and not with <p>&nbsp;</p>

TinyMCE editor inserts <p>&nbsp;</p> instead of <br> tags when I press enter in my text for a new line. How to force TinyMCE in WP to replace newlines with <br> and not ...
0
votes
0answers
60 views

Most elegant way to create html for shortcodes?

Shortcodes seems to be very nice way to introduce complex features to the content blocks, but I don't like to generate html inside shortcode function. Instead I would like to create template file for ...
0
votes
4answers
104 views

Link to file in plugin directory from wordpress template?

I know that plugins and theme files should be kept separate but for for internal use I need to do it this way. In my themes header.php file I want to include a php file which just contains html, ...
0
votes
0answers
29 views

Enable WP to accept standard jQuery code embeding between the <body> tags [duplicate]

I don't know what is the reason that WP is not accepting the standard embedding technique from jquery website ( http://learn.jquery.com/about-jquery/how-jquery-works/ ): <!doctype html> ...
0
votes
3answers
178 views

Unable to run jQuery script in my template file

I really want to run a simple code in my template file. E.g. if I put somethign like this in my page.php: <script type="text/javascript"> jQuery(document).ready(function($) { ...
1
vote
3answers
220 views

Flush Rewrite Rules when new site is created on network

I am working with a multisite setup and I have created some custom post types, which seem to work fine except when trying to view any of the post types pages on the front end, I get a white screen. ...
0
votes
1answer
28 views

Custom template support for custom post type?

I know I can use single-{posttype}.php but can I use something like single-{custom-post-type-slug}.php to target a specific custom post type post? Or is there another way like a custom template which ...
0
votes
1answer
228 views

custom single.php not working

Trying to solve this issue for the past hour and I can't figure out what's going on. Trying to create single-blog.php (I have a few posts which are under the category 'blog') but Wordpress ...
0
votes
1answer
34 views

Archive Template being used instead of Category Template for Custom Post Type

I have a Custom Post Type created, that has its own Custom Taxonomy that give the Posts their own Categorys. I am currently building the Templates. The Custom Post Type has the slug service, and the ...
0
votes
0answers
26 views

minimum code requirements for new template

I am trying to create a very light-weight wordpress template which loads the minimum code overhead from the wordpress stack. I would like to have my template recognize that its part of wordpress, so ...
0
votes
0answers
307 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 ...
1
vote
1answer
85 views

Where to call wp_enqueue_script in a plugin with custom template?

I am writing my first plugin and I have this code in the main plugin php to replace home page with custom template add_filter( 'template_include', 'replace_home_page' ); function replace_home_page( ...
0
votes
2answers
98 views

Custom post type draft use wrong template

I have a custom post type called agenda with a custom post template called single-agenda.php. When I have a draft of an agenda post, this uses the content in the template single.php. When I publish ...
0
votes
0answers
59 views

Why is my no-results.php template moving my sidebar and footer into the main container?

I'm really stumped on this one but I'm hoping it's just another case of "It's late and you're missing something simple." My index.php contains an if statement: If there are posts, run the loop and ...
-2
votes
1answer
103 views

Twig+Wordpress how to use array arguments inside a function?

I already asked this on stack overflow but then I found this place. I've searched but didn't find any answer to this. I'm using a theme that was developed using the Twig template system. I don't ...
0
votes
1answer
74 views

Fake Single Wordpress Post (Page) Loop

In a plugin, I am building a custom page with add_action('template_redirect', function(){ include(TEMPLATEPATH."/page.php"); exit(); }); add_filter('the_title', function(){ return "Virtual ...
0
votes
2answers
32 views

Listing pages which uses specific template [duplicate]

I have created a template named product.php with the following header: <?php /* Template Name: Product Page */ How can I list, in a sidebar, every page that uses the "Product Page" template? I ...
0
votes
1answer
804 views

Woocommerce Custom Template for Specific Product Category

I am building a store using the Woocommerce plugin. I need to set up a template for a specific category, let's call it 'awesome', so that it displays all products in a way that is different from the ...
0
votes
1answer
150 views

why is this content-template not showing any of my blog-entries?

i'm using the blogolife-theme on wordpress 3.6.1 my template looks like this: <?php /* Template Name: Template One */ ?> <?php /** * A custom template file. * @package WPLOOK * ...
0
votes
1answer
30 views

how to register a second page-template

i'm using blogolife http://wordpress.org/themes/blogolife and like to add another page-tamplate which is identical to the standart page-template but has a different sidebar. also i'd like to add a ...
0
votes
1answer
79 views

Fatal error: Call to undefined function the_ratings_results()

I was wondering if I rack your brains a bit on this one. I have a custom theme that has files in the theme folder but do not load as wp template files on the page settings. I also run EDD (easy ...
0
votes
1answer
41 views

How to make the first widget box to be closed instead of open in admin

When I access the Widget page in admin the first widget box is always opened no matter if I closed it in previous session or not. How to make it closed and not open? E.g. in this image you can see ...
0
votes
2answers
253 views

how to show only specific category for a template

I have a custom template which should only show posts of specific categories. What do i need to change inside this code, to get this done? if ( ! function_exists( ...
0
votes
3answers
458 views

Global variable set in the template's header.php is unable to echo in footer.php

E.g. I set this in header.php in my template: <?php $postidextra = get_the_ID(); ?> <?php $sidebar_state = get_post_meta($postidextra , 'rw_sidebar_state', true); ?> And I can echo ...
0
votes
0answers
36 views

Creating a custom menu with icon fonts

I want to create a custom menu with icon font markup. So I may need to have my list item have e.g. this: <i class="gen-enclosed foundicon-left-arrow"></i> contained inside anchor - or ...
0
votes
0answers
78 views

Customizing template menu output to fit zurb foundation markup

I want to have custom main menu markup in my Wordpress template. I want it to fit Zurb Foundation markup - to be specific - for submenus. I've figured out how to customize class & id if list ...
0
votes
0answers
29 views

Choose to show or not show title on a template?

I want to show the page title in some pages but on others I don't. I'm wondering how to do it. I thought about using differente content templates one with title and one without. But I'm wondering if ...
0
votes
1answer
37 views

List of a specific Custom Post Type in Custom Template

My WP 3.6 has created a custom template using register_post_type() named movie. I inserted few movie via Admin Dashboard > Movie. For Permalink, I have set to Post Type, therefore, for example, ...
1
vote
0answers
53 views

Search form not finding content in template page

I created some template pages on my wordpress theme and when I'm trying to do search for some words it returns Nothing Found. When I tried to search for words from the posts or normal pages(Not ...
0
votes
2answers
194 views

index.php template is used instead of blog page

I am trying to set WordPress so that home page is static, and the blog page is a separate page. So, I created two page templates in my theme., lets call them home_template and blog_template. Then, I ...
2
votes
1answer
236 views

wp_remote_get returns an error for valid URL

I currently have the following snippet of php to fetch some HTML and render it in my theme(squash theme). <?php $response = wp_remote_get( ...
0
votes
1answer
44 views

Does wp_mail work in frontend tempate file?

I am creating a function in a template that will send an email using wp_mail function. My question is if it can be used be not logged in users or not. I mean directly from a template file like (it's ...
0
votes
1answer
27 views

Will this js code work in a page template?

I have been given this code that I want to adapt and use to change a link in a template.php file, I have not been able to adapt it to work so would love any help that can be given. <script ...
0
votes
0answers
25 views

Template not properly being applied to page (no side menu)

I'm having a bit of trouble getting a particular side navigation menu applied to my sub-pages. The main page uses a specific template for the side navigation and the navigation bar displays perfectly. ...
0
votes
1answer
95 views

Make Terms Under Custom Taxonomy Use Specific Single.php Template

Yesterday some wonderful people helped me solve the issue here about templates for custom taxonomy terms. Now I have a related question. Again, I have a custom post type set up in my functions.php ...
0
votes
0answers
21 views

Stuck with custom URL REWRITE

Hello I'm creating a custom url rewrite structure for my WordPress site. First I had the following code to have url: /objekt/<GID> which loads objekt page and have query var GID. add_action( ...
0
votes
2answers
2k views

Where is get_header('shop') file in Woocommerce templates

I need to modify the get_header('shop') file in Woocommerce but don't know where it's located, if someone knows please help me out - thanks!
0
votes
4answers
139 views

Make Custom Taxonomy Category Use Parent Template

I have a Wordpress custom post type set up in my functions.php called "Research" I have a custom taxonomy called "Classifications" Under that taxonomy I have the terms/categories: Old Research ...
-1
votes
1answer
76 views

How do I create a template page to show 3 blog posts?

I have a blog theme that I created which shows one post per page. To do this I simply set up single.php the way I wanted, and I have some code that links the 'blog' item in the nav to the latest blog ...
0
votes
2answers
548 views

Post formats template

I would like to know what template wordpress uses to display post formats archive pages? What is parent template file that is used when there is no specified template file and what is specified ...
0
votes
1answer
48 views

Storing postID in session variable to query database when visitor on custom template page

I have an application with 3 custom post types, A, B, and C. The post types B and C are related to A using acf relationship fields. I've designed a single template for A post types. When viewing this ...
0
votes
2answers
151 views

WP frontend output of custom textarea fields not respecting line breaks. In admin it's OK

WP frontend output of custom textarea fields not respecting line breakes. In admin it's OK. Right now I am using this: <?php $options = get_option('my_custom_plugin_options'); ?> <?php echo ...
0
votes
1answer
32 views

Custom single page based on which custom page template is selected

I have two custom page templates ("template-blog-left.php" with the sidebar of the left side, and "template-blog-right.php" with the sidebar on the right side.) but I don't know if there's any way of ...
0
votes
0answers
20 views

Add to template page swf bad quality

Hi i add swf file but quality is not good! <?php /* Template Name: Test */ ?> <?php get_header(); ?> <?php global $title; global $wpdb; global $current_user; ...
1
vote
1answer
131 views

Set template based on query in URL

I want to be able to force WordPress to load an page/post based on a query in the URL. www.mywordpresssite.com/posts/myarticle?template=custom This URL should load the myarticle post using template ...
0
votes
1answer
193 views

Category link redirect to custom template page instead of index.php?

I want to make template page for my custom taxonomy. I have custom taxonomy categories listed as navigation links. It's the country list (China, Slovenia, Serbia...). Every of this categories has ...
0
votes
3answers
259 views

make permalink go to a custom single.php file

hope somebody can help me with this because I am struggling for a while. I want to use two single.php on my website, one to display the regular posts and another to display some products that I will ...
0
votes
2answers
66 views

How can template identify what page it's being used on?

I have a template that is used for many different sections of my site (About, News, etc.). The nav bar needs to show a little graphic arrow below the section you're in. I was passing this via the ...
0
votes
1answer
37 views

Given a page ID, how to display entire page (header/content/footer/sidebars) from a plugin hook

Given a page ID it it possible to display the page content from within a plugin hook. I would like to know if it is possible to display the entire page given a page ID ...