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

learn more… | top users | synonyms (1)

1
vote
3answers
474 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
39 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
631 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
64 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
388 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
144 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
195 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
100 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
178 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
137 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
69 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
330 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
37 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
167 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
61 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
435 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( ...
1
vote
3answers
2k 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
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
51 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
57 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
587 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
548 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
56 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
28 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
1answer
181 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 ...
2
votes
2answers
5k 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
286 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
285 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
941 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
65 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 ...
1
vote
3answers
360 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
37 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 ...
1
vote
1answer
246 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
2answers
469 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
406 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
81 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
64 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 ...
0
votes
1answer
452 views

excerpt not showing up

I have a custom template for homepage and in it, i want to display excerpt from some category. but not even the simple the_excerpt() isn't working. i tried the_title and the_content, but only title ...
0
votes
1answer
67 views

two active templates for one post

I wanna have example.com/post-name -> uses template1.php example.com/post-name/details -> uses template2.php I found this discussion, so I implemented the codes in my theme’s ...
0
votes
2answers
104 views

printf, translation and the_author_posts_link()

For some reason the following code is not displaying correctly on the frontend of my site - <?php printf( esc_attr__( 'About %s', 'textdomain' ), the_author_posts_link() ); ?> Instead of ...
1
vote
1answer
59 views

How to modify wp-includes without messing my wordpress installation?

I'm using a Twenty Twelve theme with a child theme. When the screen is shrunk to less than a certain width a responsive menu is toggled. The problem is that this menu's top level pages look the same ...
0
votes
1answer
691 views

Where is the template for the 'standard' format of a post in the theme twentythirteen?

I have selected the 'standard' format for a post: I am now trying to edit the layout of posts, in index.php I can see the following line: get_template_part( 'content', get_post_format() In the ...
0
votes
1answer
160 views

Change “posts per page” depending on width

I'm working on a responsive theme. One part is a sort of news flow (blog). In desktop widths (above 767px) the news template is vertically divided in two. The left part is a navigation which lists ...
-1
votes
1answer
55 views

Exceprt not displaying

I am using a custom template homepage in which I want to display some excerpt from a category but it's not displaying as I code for just the_excerpt. I have a confusion too, they say the the_excerpt ...
0
votes
1answer
26 views

Where is the code for “Front Page Template”?

I'm using the TwentyTwelve theme. For my static front page I'm using the "Front Page Template", but I want to modify it so it doesn't include the page's title on the rendered page itself. So I went ...
1
vote
1answer
64 views

post edit button on front end

If you are logged-in and switch to the front-end the default Wordpress theme Twenty Eleven provides edit buttons next to every post. Pressing this button you get to the certain post's back-end post ...
1
vote
1answer
201 views

is_archive() content being shown instead of is_category()

My Issue: If I browse to http://mysite/category/mycategory, the if (is_category()) content isn't displayed, the if(is_archive()) is shown instead. My code: archive.php: <?php ...
0
votes
2answers
135 views

If Posted After Date

I need to get a different "get_template_part" based on the date and category. I have changed the outlay of the category which means any post in that category before today's date wont be able to use ...
0
votes
1answer
30 views

Prevent plug-in scripts on a specific template?

I have a plug-in which is interfering with my Google Map Embed in the template I'm using for my about page. Is there a way to prevent that plug-in from hooking in all of it's script files through ...
0
votes
1answer
40 views

I would like to feature a tip on the homepage

I'm sorry if this question is explained somewhere, I couldn't find it. But it's also difficult to express this special thing in a second language.. I have a very simple homepage, and on that homepage ...