Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.
0
votes
0answers
25 views
Permission denied in template-loader .php
Oh man.
I tried to create a custom page template for a page on my site
page-cumberland-principles.php
When I go to view that page, the page showed up completely blank.
I used wp_debug, and found ...
0
votes
1answer
32 views
How to find out which template the HTML content comes from?
At my page, I want to change the text "next" and "previous" at the bottom of the page, but I can't figure out which PHP template it derives from. I tried searching the classes that was connected to ...
0
votes
3answers
38 views
Is there a way to make this kind of loop shorter and nicer?
Here is my loop code, i want to call different page templates for different pages. Please notice that this is a one-page-layout.
<?php $args = array( 'post_type' => 'page' );?> <!-- get ...
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
584 views
Site Title appearing twice on live site
My site template's header.php file has the following:
<title><?php wp_title ( '|', true,'right' ); ?></title>
Why does this produce the site title twice on each page?
4
votes
5answers
289 views
How to show a under construction page for a domain but still be able to work on index.php?
I installed a WordPress for a domain name. When I use this domain name will point to index.php in my template. I want show a under construction page for this domain name, but the other hand I still ...
18
votes
9answers
17k views
get name of the current template file
I've found this to display the current name of the file used in template:
function get_template_name () {
foreach ( debug_backtrace() as $called_file ) {
foreach ( $called_file as $index ...
1
vote
1answer
67 views
How to prevent execution of default query, while preserving ability to use WP_Query in template?
PROBLEM: I'am trying to prevent execution of default WordPress query for custom category template. I have found a possible solution, but looks like it preventing execution of all post queries:
...
1
vote
1answer
22 views
get_search_link() redirects to 404 template page
I built a custom theme, and in it, there is a 404.php page and a search.php page.
Elsewhere in the template, I wanted to link to the search page directly. So, I used the get_search_template() ...
0
votes
1answer
44 views
Wordpress removing data attributes for scheduled post
Hi I'm using the smarty templating engine in wordpress to generate HTML like the one below:
<li>
<div class="checkbox_container" data-asin="B0009Y7APU"><input type="checkbox" ...
2
votes
1answer
118 views
Displaying a WooCommerce product via PHP
Having a hard time composing a searchable query, so I apologize in advance if this has been covered.
I know you can add WooCommerce products to a page or post via short code, but I have one section ...
0
votes
0answers
62 views
Get image URL from media library in input
On wp-admin/post.php?post=447&action=edit for example I have a link and an input.
The link appears as follows:
<a href="#" class="button insert-media add_media" data-editor="tj_image_url" ...
0
votes
1answer
21 views
Query with no terms uses index.php template instead of archive.php
I'm using the Query Multiple Taxonomies plugin to get a page of search results (all of which are a custom post type - car).
If any search terms are added, so the url looks like this:
...
0
votes
0answers
11 views
Is there some way to put a theme's header.php and footer.php in a subdir [duplicate]
and still call them with get_header() / get_footer()?
For example {themedir}/templates/headers/header.php
of {themedir}/templates/footers/footer.php
With templates this is easy, but I can't get it ...
0
votes
3answers
115 views
bloginfo('template_directory') img src
I am lazy loading some images with URLs which are added via custom fields.
The lazy load plugin I'm using requires a place-holder image in the src attribute and the actual image in data-original.
...
0
votes
0answers
21 views
Single Post Template with Dropdown Option?
I'd like users of my theme to be able to select a single post template via a dropdown menu on the post screen.
I know of a plugin that achieves this but I would like to be able to achieve the same ...
1
vote
2answers
29 views
Generate Catalog Of Posts Based On Template
Is there a way to print a hierarchy of posts/pages/custom post types based on page template?
EG. I am often asked to review another web site and I'd like a way to 'see' all the pages that are ...
0
votes
1answer
70 views
Load php file with jquery in single.php
I implemented in my worpdress theme ios button switch and when someone click the button the script load a php file with the text: on or off
Here is the code:
<script type="text/javascript">
...
0
votes
2answers
28 views
implement separate templates for 1 post type
I have a custom post type 'courses', with a course description as post_content, and number of attachments
I also have a custom post type 'course units', linked to the courses with a custom field ...
0
votes
4answers
1k views
Wordpress not respecting template hierarchy (fetches index.php instead of single.php or page.php)
I've encountered a strange error while developing a custom theme.
After finishing editing the template for a custom post type single view, I passed onto working at the template files for pages and I ...
-1
votes
1answer
41 views
How can i hide content if not friend in Buddypress?
How can I hide some specific contents or div or other stuff depending on being friend or not in buddypress ??
I tried to use the bp_is_user_friends() function but it did not work !
3
votes
2answers
142 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
5 views
Dynamic heading for page and sub-pages, while sub-pages display a description field from their grandparent page [duplicate]
I want to have a heading that dynamically changes when I change the section i.e. the About us section and all sub pages have a heading of About us and a sub heading description of a custom description ...
0
votes
0answers
34 views
Linking Attachment page to another attachment page of larger size
I am not sure is it really possible. I have a gallery. But few years ago, I did not cared to make the image size on attachment page full size. You know what I mean, attachment page shows default size ...
0
votes
1answer
63 views
PHP code rendered in HTML
I'm trying to find out why any template different than index.php doesn't work.
I've created a category-news.php file (also tried with category-4.php and mostly all alternatives), but when opening ...
-1
votes
2answers
66 views
stop blog page from using index.php?
I have a static homepage with a custom template I.E hompage.php the blog loop is set to a static page named blogg, it uses the index.php page as a template, there a collection of other pages using the ...
0
votes
2answers
53 views
How to edit contents of dynamic_sidebar()?
I know PHP well but I'm new to Wordpress. I got an incomplete Wordpress website. It has a static home page with an Aweber newsletter form. I tried digging into installed theme and in home.php I came ...
0
votes
2answers
684 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 ...
0
votes
0answers
66 views
How do I call a custom template for specific Product category and all ancestors in WooCommerce?
I am very new to WooCommerce and Wordpress. I am currently creating a website using both and I'm having trouble assigning a custom template to a specific category and all its ancestor categories.
I ...
0
votes
0answers
57 views
Why won't the action hook wp_head won't accept parameters?
I'm working on a plugin that adds scripting to the head using
add_action('wp_head',..);
I have to pass a variable to the function to get my desired result. To test this I'm simple "echoing" out the ...
0
votes
0answers
33 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
1answer
16 views
Why is this page using the homepage template and not the one it should?
One of my clients has installed a theme where when a visitor enters their username and email to register as a new user they get shown a link to download a custom report file.
This was working fine ...
0
votes
1answer
63 views
How to use get_template part in the plugin?
I was using the entire template in the plugin, but I would like to use get template part, so that I can reuse the header and footer in the original template. The code is like this:
add_filter( ...
0
votes
0answers
86 views
Javascript conflict Quform with BG Slider [closed]
My background slider is not working only on pages that have the QuForm plugin on it.
Their forum said that this was the problem on my footer
<style type="text/css">
#slide-list {
...
0
votes
0answers
17 views
2) Adding Page Attributes Metabox and Page Templates to the Posts Edit Page? [duplicate]
I cannot ask directly to the post.. So I will try to ask here.
On the Question: Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
On Answer 3 There is a breakdown of 7 steps.
...
0
votes
2answers
417 views
[Custom field template plugin] Upload limited to 20 inputs file
am running the CFT plugin version 1.9.2 on a 3.1.3 wordpress site and in the admin i did set up 30 input file fields related to a custom post type. It all works fine until the 21st field (and beyond) ...
6
votes
2answers
9k views
Adding Page Attributes Metabox and Page Templates to the Posts Edit Page?
(Moderators note: Title was originally "How can I add the "Page Attributes" and/or "Page Attributes > Template" selector to POSTS editor")
WP currently only allows the assignment of a "template" to ...
0
votes
0answers
22 views
Comments in Wordpress shoves content out of wrapper on updates
I have a problem with comments in the Wordpress theme I'm building. As of now, I can comment just fine, but whenever I do (press "reply", "edit comment", press the date, really anything that involves ...
0
votes
0answers
70 views
Single Post template and Archive Post template
For the Single post, wordpress would choose the Single.php.
which is below
<?php
/*
Template Name: single movie Template
*/
get_header(); ?>
<div id="primary">
<div ...
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 ...
-6
votes
3answers
262 views
Jquery Slider for profile template
I want to show the posts under a category in my page.The first 5 posts should be shown when the page loads and When the user clicks the next button/link next 5 posts should be shown. Currently I show ...
0
votes
2answers
142 views
How to Increment ID value within ACF Repeater Field Loop
The code below is meant to display an Advanced Custom Fields Repeater field.
I need to have unique values for the "for" attribute of the Label tag, and for the ID value of the trailing checkbox input ...
2
votes
1answer
144 views
Display HTML only if Custom Field has a Value
I am working with a plugin called Advanced Custom Fields.
I am looking for help with code for my custom post type template, which is displaying some repeater field data. I have HTML wrapping each ...
0
votes
2answers
69 views
Best practice to update the file header.php
I would like to know, what is the best practice for updating the header.php file:
From within WordPress editor: Appearance > Editor
or Directly in the header.php file itself (in the www_root)?
0
votes
2answers
146 views
How to update Wordpress custom SQL Select query for custom taxonomies so that syntax is correct?
I have a Wordpress website that written by third party web developer for version 2.9 before custom taxonomies were fully implemented. We have since upgraded to latest wordpress version 3.5.x. There ...
0
votes
0answers
29 views
including custom template into template and changing parts of it through cms
I made my custom template for front page but now I want to make front page to include some other custom templates, for instance, a template which contains three columns and below that a gallery.
I ...
0
votes
0answers
36 views
Best Wordpress eCommerce With Support? [closed]
I'm looking for the best option to do a wordpress website that has ecommerce capabilities. Basically will be setting this up for someone, but want to have creative ability to do the layout in anyway ...
0
votes
1answer
84 views
Display Posts Query with IF function
I'm writing a template to display my custom posts types in a list. But I only want to have the post show if it has a value for one of my custom fields. I'll explain: My custom post type is "Faculty ...
3
votes
3answers
382 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 ...


