Tagged Questions
0
votes
0answers
29 views
Template for page with overridden Theme
I think I've got a somewhat uncommon issue. My wordpress site uses a custom theme, but I wanted to add a blog alongside that, without using multisite because my host charges 3x the amount for such a ...
3
votes
2answers
139 views
Pass PHP variable to javascript
Is there any possibility to pass some PHP variables in javascript so I can use them later?
Only in single.php.
I heard about wp_enqueue_scripts but with that it is neccesary to declare a path to a JS ...
0
votes
0answers
32 views
Incorrect template is being loaded [closed]
I have a custom category.php template within a theme which used to work.
Since making changes to other template files for other types of pages, this has stopped working.
Whenever I attempt to visit ...
0
votes
2answers
33 views
Is it possible to activate page template without manually selecting it in wp-admin?
I'm launching a new WordPress theme and was wondering if it's possible to select and activate that specific page's template in code rather than going into the CMS and manually selecting it from the ...
0
votes
1answer
43 views
Using index.php as page template
When you put a name at the top of your index.php like:
<?php
/* Template Name: Blog Template */
?>
it will work for front-page and it will also create a new page template. I'm wondering if ...
0
votes
1answer
92 views
Using custom post types within a section of a template
I'm trying to get the hang of custom post types and I am trying to get them to loop through the post types within a page template. I'm already using the MultiEdit plugin to display certain content ...
0
votes
1answer
62 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 ...
1
vote
1answer
88 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
102 views
Shared Content but “Updatable” Through the Main Site
I have been doing quite a lot of research the past week, and have not been able to find a solid answer that fixes my problem. So, I decided to come here to ask to see if anyone knows of how to help ...
1
vote
2answers
59 views
is_home() returns TRUE on page template
I'm wondering why my link: http://localhost/?page_id=3433 returns TRUE on is_home() usage:
if(is_home()){
var_dump(is_home());
die('test'); ...
0
votes
2answers
70 views
How to insert category list into post creation page, and retrieve chosen categories?
I would like to display the full list of categories on the Page creation page, so that the user can pick using checkboxes which category posts should appear on that page.
I then need to retrieve ...
-1
votes
1answer
54 views
if and else statement not working on the iframe php page
i want to use if and else statement on iframe but it's not working
if and else statement not working on the iframe php page
<?php
if("p=947"){
?>
<iframe width="820px" height="1200px" ...
1
vote
1answer
129 views
How to dynamically save a selected option from page “Templates” selectbox?
When I select a template for a page from the "Templates" selectbox, the selected item gets “value=selected” only after I hit save draft/publish/update.
<option value='template-gallery.php' ...
0
votes
1answer
65 views
How do i create a list-posts-page?
I'm trying to create the actual "blog" page that lists all the posts. It seems like such a basic thing, but i can't find out how to do it.
Do i create a page and assign it a special template? If i do ...
0
votes
1answer
135 views
Get page by template?
I'm in a complicated situation. I'll try to explain it as easy as possible.
Imagine the following pages:
Page 1
Page 2
Subpage 1
Subpage 2
Subpage 3
Each subpage of page 2 lists posts from a ...
1
vote
1answer
146 views
Why is custom template not seen as page with is_page()?
I created a couple of templates for a project, which is in fact a child theme of the Contrast theme. In the Wordpress CMS, I can select the templates I created:
http://i.imgur.com/PYKqK.png (Can't ...
0
votes
1answer
33 views
how to style an individual page in a category [duplicate]
Possible Duplicate:
How to show a post single post in page template
im trying to understand how to target a template for an individual post.
if i use the following hierarchy for my site,
...
0
votes
2answers
128 views
How do I pass data from page content to the underlying PHP template
Pretty much all of the content on the site is going to be dynamically generated (php + db backend)
What is the preferred "wordpress way" of passing data to a php template (set up as a template in a ...
0
votes
2answers
70 views
Putting two themes together to create a complete site
I know my way around WP as probably an intermediate user. In the near future, I will have to integrate the design of a template from a completely different theme into a theme I'm currently using. The ...
0
votes
3answers
710 views
Custom page template not working
I followed this tutorial for the page specific template -- http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
Created a page through wordpress admin panel - Blog Page URL like -- ...
1
vote
1answer
458 views
How do I create a separate page for each author?
I am working on a website where I have authors listed on a custom-made author's page using code adapted from this site: http://bavotasan.com/2011/an-even-better-author-list-in-wordpress/.
When you ...
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 ...
0
votes
1answer
64 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 ...
1
vote
3answers
437 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 ...
0
votes
1answer
165 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
1answer
182 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 ...
1
vote
1answer
808 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
3answers
116 views
Need help with adding templates (archives and sitemap) to Wordpress child theme
I recently switched themes, and my old theme had templates for sitemap and archive (in fact the archive was one of my most viewed pages.) When I switched themes the link to the archive and sitemap ...
0
votes
1answer
188 views
Why won't pagination work?
I am using a page template with code to display all blog posts:
<?php /* Template Name: Blog */ ?>
<?php get_header(); ?>
<div id="main">
<?php
// ACF Page number variable
...
1
vote
3answers
585 views
Change page template programmatically ?
I have two page templates and Qtranslate installed.
I want to choose one or another depending the language selected.
Can I do something like this ?
if($q_config['lang'] == 'en'){
// load ...
0
votes
1answer
38 views
wordpress template page Usage [duplicate]
Possible Duplicate:
Loading template files from a subfolder in my theme?
How to create template page which is in a separate folder within theme directory, for pages and also to open it in ...
0
votes
1answer
125 views
Getting pages filtered by template assigned
I want to retrieve pages with determinate template assigned. Function get_pages() hasn´t any parameter to select by template. For exmaple if I created three pages: Home, Page 1 and Portfolio. After I ...
0
votes
1answer
84 views
How does wordpress link page templates to individual pages
According to the Codex docs, wordpress uses the query string and the template hierarchy to determine which template to use for a certain page.
First, WordPress matches every Query String to query ...
0
votes
2answers
531 views
Single post as homepage?
I'm wanting to set a single post as my homepage.
I have a photographer's site.
There are a few galleries (weddings, portraits etc). Each gallery is a wordpress post with attached images.
The post ...
0
votes
3answers
2k views
Page template query with WP_Query
I'd like to query only pages with a certain page template with WP_Query or a function that would return the post object, but I can't find any information about that on the officiel codex.
0
votes
1answer
755 views
Prevent 404 of Author pages without posts
How do I prevent author archives without posts from 404ing?
1
vote
2answers
3k views
Display a specific dynamic sidebar widgets on a specific page
I have had a wordpress site handed off to me halfway through completion. It's been at least a year since I last used wordpress and there are a lot of things I'm finding different. The way I am used to ...
0
votes
1answer
652 views
Redirecting posts in Wordpress to a specific page
I created a page so that it would appear in my navigation menu. This page would however be my posts page (i.e. all posts would go here) and would also be my front page.
I am unable to find anything ...
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
148 views
Subpage template
I've had a look around already but couldn't find an answer to this.
Is there a way to create a template that applies to all pages that have a parent? something like sub-page.php without having to ...
1
vote
2answers
411 views
Create built-in pages without creating actual pages
For example:
site.com/contact (or site.com/?page=contact if not using permalinks)
when someone goes to that page I want to load a theme template, like page-contact.php
But I don't want to create a ...
1
vote
1answer
244 views
Using Pages to handle calls for custom post types
I have created a page on which I would like to run queries exlusively for one custom post type in the same way I'm using Category.php, Author.php and index.php to run queries for regular posts. I ...
2
votes
3answers
2k views
Hide page visual editor if certain template is selected?
How do I hide the page editor (WYSIWYG editor) if the current page is set to a certain template.
I have the following code already to add in custom meta boxes when certain templates are chosen:
...
0
votes
2answers
507 views
Searching multiple custom post types and pages
I'm using bainternet's method for searching custom post_types and it works great. However, I've recently been requested to return more than one "specific" post type and perhaps individual pages for a ...
2
votes
1answer
680 views
Can I apply a WP theme to a specific custom page template?
One section of my website is going to be completely different visually than the rest of the pages, is there a way to apply a WP Theme to specific page templates ?
0
votes
1answer
350 views
Custom Page Template [closed]
Could somebody help me make a custom page template?
I'd like to have a basic page (with sidebars, header and footers) and a table for data. I'd like the data to be taken from custom fields. ...