0
votes
2answers
28 views

WP Theme Development, Adding Content Areas to Custom Page Template

I am not sure how to ask this, which is why I have been having trouble finding anything via google searches. I am hoping someone here will understand what I am looking for and be able to direct me to ...
0
votes
2answers
63 views

Page Template Won't Load Correct CSS File

I can't get the correct css file to load for my page template. The page is correctly loading the template but still using the default css file. This is the code I'm using to load the page template's ...
0
votes
1answer
134 views

How to use different jquery function of idangero swiper dependant on page template?

I have struggled with adding the idangero swiper jquery plugin to my site, but have managed to produce the code below. This works very well but only on the one custom page template defined in the ...
0
votes
2answers
81 views

Display custom meta box in my template file

Need help displaying my custom meta boxes on a template file. Following a tutorial Here's the code from my functions.php: function get_custom_field( $value ) { global $post; $custom_field = ...
1
vote
2answers
103 views

Define custom Page Template without its own .php file

Is there any way of defining a Page Template from some function/filter/hook, without having any .php file containing the comment at the top of the page to declare the Template Name? For example, ...
0
votes
2answers
345 views

Filtering posts by category name based on page's slug

I've created a page template and the goal is to create a loop that gets all posts by category name. The category name is passed from the slug of the page name. I haven't been able to get this to work ...
0
votes
1answer
71 views

Get_template_part inside a folder

So I've the following code in order to search for templates inside a custom theme I'm working on: <?php $my_theme = wp_get_theme(); get_template_part( 'masthead', $my_theme->Template); ?> ...
0
votes
2answers
356 views

Page Template Dropdown For Custom Post Types

I am using the following code to create a dropdown on the edit post screen which will allow users to choose page templates for the post type. The code is working but when I try using it multiple times ...
1
vote
1answer
359 views

Define page template in wp_insert_post

How can I set which page template this page, created using wp_insert_post, uses? I want it to use template-blog.php This is my current function; add_action( 'admin_init', 'mytheme_admin_init' ); ...
2
votes
1answer
35 views

Returning Variables back into a template

If I put a function that I want to use in a template I can put it into functions.php function myfunction(){ echo 'My String'; } add_action('myfunction','myfunction'); and in a template file put: ...
1
vote
0answers
71 views

next_/previous_post_link() `in_same_category` appears to fail when true

I'm using the Modernize theme's custom Portfolio type page. In the single-portfolio.php template, I call next_ and previous_post_link(), which correctly display links when in_same_category is set to ...
0
votes
3answers
123 views

Display additional page templates and a sidebar on plugin activation

I'm developing a child-theme off of the Twenty Twelve (1.1), using Wordpress (3.5.1) and the Woocommerce plugin (1.6.6). I've noticed that the problem with creating the online shop, single product ...
0
votes
2answers
217 views

Function to check if custom page is used by page?

I have template-clientlist.php now I search on wordpress doc but can find a function on how to check if page used template-clientlist.php template-clientlist.php <?php /* Template Name: Page Of ...
1
vote
1answer
41 views

Cant remove line that appears above page content

Hi all I am running a multisite I have custom page templates that are working fine however the home page displays the text below, am sure its not in the template and I am struggling to find where its ...
3
votes
1answer
308 views

Create “File-less” Page Template in Functions.php

(By "Page Template," I mean a theme file with the "Template Name" header that can be selected in the "Template" dropdown field on the page admin.) In multiple instances, I've built page templates ...
0
votes
1answer
764 views

Unable to use get_page_by_title() more than once per page?

On one of my page templates I need to include the contents of several other pages. For example, if my page template is called Fruit, I need to pull in page content from pages named Apple, Pear, ...
2
votes
1answer
61 views

Adjust which tempalte a page uses with a function?

I know if I had a page that had a permalink such as /stories/ then I could create a page in my template called page-stores.php and it would load in place of the default page.php when that page loaded ...
0
votes
3answers
4k views

Custom page template how to check is_page from functions.php?

Have a custom page template and trying to make the excerpt length dynamical depending on what page you are in. Functions.php <?php function custom_excerpt_length($length){ if (is_page(15)) { ...
1
vote
1answer
1k views

wp_title() handling of author page

Why doesn't wp_title() display the author's name on an author archive as it does for a category or date archive? How can I hack this functionality? header.php calls: <title><?php wp_title ( ...
1
vote
2answers
2k views

page template for attachement page?

hey guys, I couldn't find anything on the web. Is it possible to have custom template for the image attachement page. I wonder if it is possible to add a navigation to the image attachement page so ...
3
votes
1answer
5k views

Add custom template page programmatically

I'm trying to add template page from a plugin,and my template page is in this plugin folder.Is this posible?Here is my code: global $user_ID; $new_post = array( 'post_title' => 'Test ...
1
vote
2answers
214 views

Is there a wordpress function that I can use to retrieve the current page that is loaded?

Suppose that I create a page in the admin section (under 'Pages') and I have permalinks turned on and this pages slug is 'my-new-page', then is there a WordPress function that will work outside the ...