Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.
0
votes
1answer
320 views
Custom Post Type Archive Template
I have similar problem to this one: Custom Post Type Template - Archive
So, I have a wordpress custom post type called coupon. I try to assing the template to it by using archive-coupon.php, but it ...
1
vote
1answer
57 views
Custom Page Template for “Older Posts” Pages
My home page feed has a variety of items including a featured post and other features that I'd only like present on the home feed. When a user clicks on pagination to load older posts, I'd like to ...
2
votes
2answers
185 views
Load different template file when condition met?
If I visit a page on my WordPress site, WP goes and determines what template file it should use based on the template hierarchy.
If I'm doing some logic checking in the hook init and say my ...
1
vote
1answer
514 views
Is it possible to define a template for a custom post type within a plugin independent of the active theme?
I'm writing a plugin to manage data about open-source projects. I developed an object model and have successfully created all custom post types and taxonomies, as well as implemented the correct ...
0
votes
1answer
43 views
building a site with mostly custom styled, static pages.. advice needed
I'm putting together a site that will be compromised mostly of static pages with some dynamic content as well as a blog page.
In terms of naming files, what would be the best way to achieve this? My ...
1
vote
2answers
433 views
add_rewrite_rule and template redirect not working
I have a strange problem , I have the following pairs :
add_rewrite_rule('^questions/ask/?','index.php?pagename=ask','top');
if(is_page('ask')){
$tname = 'add-question.php';
...
0
votes
1answer
187 views
Template redirect is_tax() not working
I'm trying to do a template redirect in my wordpress but with partial success
function ahaali_qa_theme_redirect(){
global $wp;
$plugindir = dirname(__FILE__);
if(is_archive()){
...
0
votes
1answer
109 views
Show page title just from the first child-page in template
how can I do this:
Pages:
Home
- sub-1
-- sub-sub-1
--- sub-sub-sub-1
On home-page should only show the page-title of the first child-page like:
sub-1
I found this:
<?php $child_pages = ...
2
votes
1answer
67 views
Strange Behaviour with is_home()
I'm having an odd issue, although I can understand why it works like this I do need to find a way around it.
I have used the the request filter to modify the query for the home/index page to select ...
0
votes
3answers
224 views
Different header for each category
I'm working on a project where each category should have a custom header page.
Any suggestions? I'm just looking for some direction on how to accomplish this.
2
votes
1answer
249 views
Post/Page Preview Template
Is there a way to have a custom template php file that is only used for previews instead of it using the single.php file? This way the user knows they are in preview mode?
0
votes
1answer
63 views
How can I use Page editor for two separate templates?
On some of my pages (not posts) in my Wordpress site, I need to include a sidebar that display s information relevant to the main content of the page the user is on. I can choose, using Edit Page in ...
-2
votes
1answer
168 views
One of my pages uses the archive.php template only. Why?
I created a page and experimented with Custom Templates. Suddenly I noticed that this page started using the archive.php template and no matter which Custom Template I assigned to it, it continues ...
1
vote
2answers
554 views
Using a different template per Custom Taxonomies for single term archive pages
I have 2 custom taxonomies, each with a number of terms:
tax1
term1_1
term1_2
tax2
term2_1
term2_2
term2_3
I am trying to have each taxonomy usea different template file for each its ...
1
vote
3answers
415 views
posts page - different lengths of excerpt
is it possible to get wordpress on the posts page to do the following example.
the first three posts need to have a large image spanning the width of the title box and a longer excerpt.
the rest of ...
1
vote
2answers
180 views
On this day PHP code
I'm working with this code snippet for an "on this day" type post. However it is only showing 1 year in the past. I'm looking to automate this so it shows on this day in 2009, 2010, 2011... and as the ...
1
vote
1answer
179 views
Mass update excerpt
I'm using a photoblog theme which upon creating a new post it takes the post attachment and saves a modified "img src" string into the excerpt field. It then uses
<?php the_excerpt(); ?>
to ...
0
votes
3answers
153 views
Wordpress -> PHPBB look a like
I want to create an online forum. From my server settings I have two option of smf and phpbb. I hate both of them!. Is there any solution to turn the wordpress to a full blown online forum?
0
votes
1answer
151 views
Tag template not returning posts [closed]
I have the following code which SHOULD print out the title of all posts with the associated tag (in this case the tag is 'icon'):
<?php
$tagname = get_query_var('tag');
?>
<?php
...
0
votes
2answers
574 views
How does WordPress choose archive type template?
I can't find a comprehensive list of criteria for how WordPress determines which archive type template it chooses.
From what I understand it uses URL forms for this purpose, like:
...
-1
votes
1answer
3k views
How did you incorporate WooCommerce in your own WordPress theme?
This has most probably been asked before, but I really need to show WooCommerce products in my template, but I don't know what hooks to add where. It's my first time working with WooCommerce.
Can ...
0
votes
1answer
367 views
wp_nav_menu doesn't show on index page
I'm using calls to wp_nav_menu() in my header.php file. They're conditional, based on whether a user is logged in.
This is in header.php:
<?php if ( is_user_logged_in() ) :
wp_nav_menu( ...
0
votes
2answers
107 views
Category Template - Show Last Entry as Featured
I am working on my category template. Here is how I want the page to display:
Category Name - this is done
The latest post for each category be on top (then styled which I can do).
The Category ...
0
votes
1answer
157 views
Set generic reservation form for custom post type
I want to create a simple reservation (reservation.php) form for a custom content type (houses), i have created the reservation.php in the theme directory. The question is:
How can i link to this ...
0
votes
1answer
659 views
Use template of parent category for single post sub-categories
I have single post templates in a folder in my child theme marked "single". I need the sub categories to use the same template as their parent. I've read a dozen tutorials all of which were more than ...
1
vote
3answers
264 views
Template for custom post with custom taxonomy
The theme that I'm developing is basically a portfolio, where the projects are custom post type and they are divided in categories (custom taxonomies). Here is how I'm defining both:
$labels = array(
...
-1
votes
1answer
121 views
Default taxonomy template in plugin, override in theme
Building off of this question/answer, I've sucessfully implemented the single view for my custom post types, but I'd also like to offer the same thing for taxonomies. I've looked through the docs and ...
1
vote
2answers
410 views
display comment form for specific post id
I have three pages, and I want them all to display the comments form from a post with id=343. What code would I use within the pages to make that happen?
Here is what I've tried:
<?php
$id=343; ...
3
votes
5answers
1k views
How to rearrange fields in comment_form()
Im using a custom filter to change the fields, but can´t figure out how to change the order of the fields in the comment form.
Desired order:
comment field (first/top)
name
email
website
This is ...
0
votes
1answer
70 views
How to display a certain template element only for posts published within certain time range?
I recently migrated a blog from sub.domain.com to blogs.domain.com/sub/. Because I'm using Facebook comments, all the posts published before April 25 need to reference sub.domain.com/blog-entry-title ...
1
vote
1answer
421 views
Custom Taxonomy in plugin and template
I have a plugin that I am developing that is using custom post types and taxonomies. My question is this. How can I load the content/theme data from my plugin on to the page when the go to the custom ...
1
vote
1answer
213 views
Passing variables to templates (alternatives to globalizing variables)
I want to make my WP code simpler (there's some mess within header.php, page.php etc.). So, for example, I want to set something like this global:
$foo = get_option('foo');
So $foo will work ...
0
votes
2answers
23 views
Archive template limiting to 4 entries?
I have a category called "javascript" and it's limiting my list to only 4 entries?
<?php get_header(); ?>
<div class="container">
<div class="row">
<div ...
0
votes
1answer
180 views
infinite loop on page with comments after changing comments.php and header.php
I am using version 3.3.1 of wordpress but I'm following a tutorial that used version 2.7. After changing my header.php and comments.php code, I'm getting an infinite loop when I view the single post ...
0
votes
2answers
604 views
Change the name of the 'Default Template'
I am working on a client's site and they need to select a Template whenever they are adding a new page; the "Default Template" is not a valid choice.
I would like to rename "Default Template" to ...
1
vote
1answer
206 views
Show only 2nd level of navigation depending on active navigation
For example, suppose a menu like so:
Parent 1
Child A
Child B
Parent 1
Child C
Child D
Child E
Parent 2
Child F
In a certain part of my template, I want something to show depending on ...
1
vote
1answer
206 views
I put my blog on a subpage, how do I get page title?
I've got my blog setup on a subpage (not the front page) and I'm using the template file home.php, how can I get the contents from the page editor onto this subpage?
If I change the title of the page ...
1
vote
2answers
223 views
Clean URL permalink for custom post type
I have a custom content type of photo_group which is a collection of photos.
I want to be able to go to mysite.com/photos and have that page dump out all of my photo groups.
How can I do this ...
1
vote
2answers
103 views
Static Front Page problem
My theme uses the front-page.php file to display a number of items on the front page including a slideshow and some featured items. I have also designed it so the static front page as set in the ...
1
vote
1answer
219 views
How to make a Thumbs Mosaic
I'd like to share with you an idea for styling a bit a category template.
Here it is: I'd like to make a mosaic with all the post thumbnails of a category and use it as the heading image on the ...
1
vote
2answers
530 views
How to add template to theme in WP
I've very new to WP and I'm trying to setup a new page which displays only a specific category through the WP admin section.
I've downloaded the ACE plugin and I've managed to filter out posts with ...
0
votes
2answers
343 views
search page not found? (search.php or searchpage.php)
Am i wrong in thinking i can access the search page by using /search/ ? I've created the files search.php & searchpage.php but /search/ still returns 404?
I want to customise the page a bit...
...
1
vote
1answer
53 views
Template plugin for blog posts?
can someone recommend a plugin to do the following?
My wordpress CMS has two types of users: administrator and editor, both of whom are not technologically savvy, so they need things to be super ...
0
votes
3answers
1k views
Recommend an open source, template driven website builder UI that produces a working WordPress site [closed]
I'm a programmer at a domain registrar and web hosting company. In the past year or so we have branched into custom web design for individuals and small businesses. Currently all our solutions are ...
4
votes
2answers
208 views
Child Theme: how to override variables?
I'm going to build my first Child Theme. I understood how to override functions (hope!), but how to override variables?
For example, in a Premium Template I want to change the values of feed variables ...
0
votes
1answer
16 views
Setting up menus before making a template live
I'm currently creating a new template for a client. Their current template does not implement menus at all. They are all hard coded links in the template. The new template I making them will implement ...
0
votes
1answer
138 views
Wordpress Custom Post Type Children Template
I have created a hierarchical custom post type in wordpress called "films." It is hierarchical so it can have children elements.
When a "film" is clicked, wordpress automatically uses the template ...
1
vote
3answers
2k views
How to check if a shortcode exists?
I'm using do_shortcode function to add shortcode in my template. But i would like to check if that shortcode exists before display them.
I mean like this
If (shortcode_gallery_exists) {
echo ...
0
votes
1answer
143 views
What hooks, actions or filters i can use to customize wordpress registration page and form?
i would like to customize the design of the registration page of wordpress and also the registration form. Can i create a registration page template? or maybe tell wordpress to use a custom ...
1
vote
1answer
762 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 ...