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

learn more… | top users | synonyms (1)

3
votes
3answers
1k views

Setting a custom sub-path for blog without using pages?

Warning: fairly pedantic request ahead. I have a design that makes use of posts (I.e., the blog) and a custom post type called "howto". The site front page ("/") has a template that displays the ...
0
votes
2answers
105 views

Create a Blog Template Page

I am trying to create a template that will display a list posts of a specific custom type. However, I am missing something fundamental. So far, here is what I have: functions.php add_action( ...
0
votes
1answer
1k views

How to retrieve an image from a post and display it before excerpt of a post? [duplicate]

I'm customizing a WordPress template and I would implement the following behavior in the excerpt posts visualization in my homepage: If a post contains images (one or more), in the homepage post ...
0
votes
1answer
263 views

Some problems calling a function into sprintf() inside functions.php template file [closed]

I am new in PHP and WordPress and I am personalizing an existent template and I have the following problem. In the function.php file of the template I have the following function: function ...
0
votes
1answer
76 views

How to add menù section to my WordPress template?

I am pretty new in WordPress blog and I am developing a blog with this template: http://scorejava.com/wordpress351 As you can see at the top of the page there is a "menù" that only show the page in ...
0
votes
1answer
19 views

Odd page behaviour after removing sidebar

One of my web pages is displaying odd behaviour, after selecting a no sidebar template for the page. The sidebar has disappeared, but elements within the sidebar, now show in the bottom right-hand ...
0
votes
1answer
36 views

How to make plugin work in each template in wordpress

I am new to plugin development .I want to get all images of a particular page/post and want to show them as slideshow below the page ..Currently i am able to gather all images in media library and ...
0
votes
1answer
112 views

How to differentiate the homepage structure from the category page structure in WordPress template?

I am very news in WordPress world and I am finding some difficulties with creation of a personal template. I want implement a blog like this one (that is using WordPress): ...
0
votes
1answer
839 views

How to prevent Wordpress from loading the jQuery library at the top of the page

I am developing a site that must be HTTPS secure and Wordpress is loading <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> at the very top of my page, before <html> ...
0
votes
2answers
83 views

My template won't apply, theme still fallback to index.php

I have a CPT that I want to list the post in the frontend of my website, so i've created a page that I assigned a template so i'll be able to modify the way it look. Here is my template declaration ...
1
vote
1answer
78 views

What should I put on my index.php?

I had covered basically all the pages listed in the Template Hierarchy: 404_template archive_template author_template category_template tag_template taxonomy_template home_template ...
-3
votes
1answer
204 views

html blog template to wordpress template

i bought a new template from themeforest and it has a blog template named as blog (the main blog template), blog2 (alternative main blog template) and post which shows the inside of a post. i just ...
0
votes
1answer
102 views

Wordpress a template for subcategories fo a given category, but not for root category

I've found this simple yet elegant solution for make Wordpress using the same template category on every child and grandchild categories http://stackoverflow.com/a/3117202/391929 Full code: ...
2
votes
1answer
348 views

Hide page visual editor if template is selected - redux

The answer given to a previous and identical question is unfortunately not working on my WP install. I'm using a version of the function recommended there. function nim_hide_editor() { $post_id ...
1
vote
1answer
42 views

Show all parts in multipage post

You can do a multipage post by using the <!--nextpage--> inside the post. The question is: How can I display the whole post (not paged) for this post.
0
votes
1answer
30 views

Text in permalink

I've this kind of permalink for post type : /widgets/%category%/%postname%/ And the problem is that when going to /widgets url (http://mysite.com/widgets) a not found page error (404) is displayed. ...
0
votes
2answers
887 views

Pagination on custom taxonomy

I'm having a tough time getting this to work. It's not the first time I run into problems with pagination, or I would say with WPs URL system. Basically I have this URL: ...
1
vote
0answers
91 views

Checking for page templates in child theme

I have a simple problem I'm hoping someone can shed some light on. I have a child theme with a custom page template and I'm simply trying to check weather or not the template is in use. Under normal ...
0
votes
1answer
54 views

Which hooks are essential for post templates?

Im in the process of building a very custom theme and Im beginning to work on the post templates, but I dont know which hooks are essential for them. So like, I've seen (but cant remember where)some ...
0
votes
1answer
77 views

get_permalink returning first letter

I'm trying to use an ajax function in my custom template to retrieve a post's custom fields to show a post overview. Getting the custom fields is working, but the getting the permalink isn't. I'm ...
1
vote
2answers
135 views

Remove template drop down for certain pages

I have a number of custom templates which are assigned to different pages in my admin. Is it possible to hide/lock the templates dropdown for certain pages? For instance, I have an Events Calendar ...
0
votes
1answer
348 views

JQuery load php - php file without the template

I'm about to start writing a php file that will return a JSON array to be used as a JQuery autocomplete source. I want to create my source.php file that loads without the WordPress template. ...
0
votes
1answer
55 views

How can I add in post's the text “No content”

How can I add in a post the words "No content available" if nothing is ritten Example: If there is no text added, i want to get "No content available" automated in my template. I want to get for a ...
0
votes
2answers
118 views

What are the main parts of a Wordpress Template?

This may sound like a stupid question, but... What are the main parts of a Wordpress template, and which parts are mandatory and which parts are optional? So far I am aware of: Posts (mandatory) ...
1
vote
2answers
2k views

Return HTML Template Page with PHP Function

I want to create a form that I can use a shortcode to insert into my site. It would be really nice if I could create the HTML part in a seperate file and then insert it with a PHP shortcode (to ...
0
votes
1answer
243 views

wp_get_attachment_url not working

I have a template file which shows the posts of a category called downloads. for each posts i have attached a pdf file. I have given a link to download the pdf file on the page. But when i click the ...
0
votes
1answer
536 views

Display different header images based on current page

I want to display, based on the current page another header image. Short example: Home -> Image A PageId 1,2,3,4 -> Image B (2,3,4 are childs of page 1) PageId 5, 6 -> Image C ... I tried to ...
0
votes
1answer
90 views

RSS Feed in Custom Field

I have a custom field intended for a rss feed. It is simpley a URL in the field, how do I take that url entered and output it into the correct section in the template? <?php include_once(ABSPATH . ...
0
votes
1answer
101 views

How to slice down index.php from a template and import from another file?

I am a beginner in wordpress template development and I am trying to create a custom index file. I want to display latest posts in segments: the 2 first posts should be displayed as a list the third ...
0
votes
1answer
697 views

WP is not using the select custom template.php that its selected for a page

I created a childtheme: Fisio Inside I have: page-team.php with the name: <?php /* Template Name: Page - Team */ ?> <?php get_header(); ?> <script>alert('its the team ...
5
votes
4answers
5k views

Dynamic template serving, change theme_root using add_filter from current theme

Some plugins use the 'template', 'option_template' and 'option_stylesheet' to dynamically serve (alternative) wordpress templates. For example, Nathan Rice's ServeDefaultToIESix. For Example - ...
0
votes
1answer
34 views

new custom theme - posts displaying on top of one another

live blog I've just implemented a new, custom theme. I've noticed that my posts are now displaying all on top of one another and I can't figure out why. To test my code, I swapped out my custom loop ...
1
vote
1answer
109 views

Get search.php results in header.php?

I want one image in header.php to change for different pages. The function in header.php looks like that: if(is_archive()): //change image to "Archives" endif; if(is_404()): //change image to ...
0
votes
1answer
300 views

using WPalchemy to output custom metabox from homepage template

I am new to php and I am using wpalchemy to create a custom metabox. I want to output the info from the metabox on a template page, not inside a loop. I have tried the following to no avail per the ...
0
votes
1answer
65 views

How do I disable the “by author” hyperlink on posts?

I'm trying to disable the "author" hyperlink when making a post, but having no success. How can I do it?
0
votes
1answer
137 views

Overwriting TwentyTwelve template file with child theme template, but lower in the hierarchy

I've (I think) an interesting problem here. What I want to do is create a global archive page, with everything on it. Dates, authors, categories etc all on one page. I have a child theme, with ...
0
votes
1answer
56 views

How to know which page/file WordPress is expecting?

I'd like to know if there's a way to know which page or file (index.php, page.php, category.php) WordPress is expecting when displaying a page. I get a 404 error on a www.myblog.com/page/2, meaning ...
0
votes
1answer
65 views

Is there a list of all possible WordPress URL's?

I'm looking for a way to find out how my WordPress site handles various incoming requests, some of which I have not written templates for. For example, there are a number of archive views (year, ...
1
vote
1answer
158 views

Search results when none found - stay on page they were on

I currently have a sidebar with a search-form at the top. When the user types in a keyword, when submitted the user is took to a page with search results with posts relating to them words in each ...
0
votes
1answer
131 views

Single template will not show sidebar/bottom-nav and footer

Im using the blankslate template theme and have a sidebar which i would like to use throughout the website. On my sidebar on the homepage i have a widget called latest posts with the latest post ...
-2
votes
1answer
154 views

why does blog page ignore template [closed]

This is never answered completely anywhere. If there is a dropdown to select what page I want to use for my blog, why would it ignore the template I select? I realize it uses the index. Then why in ...
0
votes
1answer
192 views

Prevent creating multiple image resizes in twentytwelve template

I am using wordpress twentytweleve template and I notice every time I upload an image it creates 3 different thumbnail sizes. In my media settings I have already set medium & large size to 0. It ...
2
votes
2answers
1k views

Adding short codes from a page's content on header and hiding the same from page's content

I have created a page and added the following shortcode from wp-orbit-slider [orbit-slider category="test"] I want the contents of [orbit-slider category="test"] be displayed on the header ...
0
votes
1answer
50 views

Tag Posts showing in wrong places

Am using a custom template (tag.php) to show posts related to tag. So when someone clicks on say tag ‘A’ then he/she gets redirected to my tag.php layout instead of default template for archives. I ...
4
votes
3answers
943 views

Custom Post Types 404 Issue

I dont know why my custom post types render the Page not found. This is the code I am using to register custom posts. www.example.com/products/product1/ renders 404 where as ...
3
votes
3answers
2k views

Loading template files from a subfolder in my theme?

I am working on a site that will have up to 30 templates in it. I don't want to have all those templates at the root of my theme folder cluttering up everything. I know how I can modify the ...
0
votes
3answers
275 views

Listing all custom post types using a specific term on the said term's template page, in groups

I have a custom tag-like taxonomy called PEOPLE registered to all post types - both the default and custom ones. I have created a template for a single term named taxonomy-people.php and I'm ...
1
vote
1answer
1k views

wp alchemy multiple image uploader output images to template

I am using wp alchemy to add a custom metabox to my site with multiple image uploader option. This part is working fine, but I have no Idea how to go about outputting the image links to my template. I ...
0
votes
1answer
81 views

Display the first post's comments of category in comments.php template

I want the display the comments from first post of the category only. Example; Category - Post 1 (2 comments) - Post 2 (1 comments) - Post 3 (5 comments) If I am reading the Post 2 or Post 3, I ...
0
votes
1answer
1k views

Prevent 404 of Author pages without posts

How do I prevent author archives without posts from 404ing?