Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.
-1
votes
0answers
22 views
show portfolio caterory on page template
For 3 days now I've been fighting with this & my brain is fried trying to figure it out. Support is lacking.
Page 2 is using page template portfolio 2, & we only want Topic B portfolio ...
0
votes
1answer
23 views
why is markup routinely placed in functions in wordpress?
Here is an exampple from a woothemes theme. I'm definetly not having a go at woothemes - they are a great theme provider with great standards and this sort of thing is fairly typical in themes. why?
...
0
votes
2answers
30 views
Shortcode / plugin with custom (flexible) output
Following scenario: I'm building a theme framework which I want to reuse in various themes of mine. In this framework there is a collection of many shortcodes. For exemplary illustration of my ...
0
votes
0answers
12 views
One page site (returning from google) + history manipulation
I am making a one page site using wordpress.
The one page has all the menu pages linked into one, but there will be arbitary pages (landing pages) for subcategories and stuff at the moment.
I have ...
-1
votes
1answer
17 views
How can I force URL of a custom post type archive to use a page template?
I have the following custom post type:
if ( $args->has_archive ) {
$archive_slug = $args->has_archive === true ? $args->rewrite['slug'] : $args->has_archive;
if ( ...
0
votes
1answer
18 views
Add multiple pages to theme customizer
So that theme customizer over at /wp-admin/customize.php is pretty cool, but it looks like it only lets you customize one page. Is there any way to add multiple pages or other theme template pages to ...
0
votes
1answer
30 views
Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
I am working with custom post types and I had trouble with the nav menu not getting the .current-menu-item on my custom post archive page menu item. In fact, when I was on that page or any of the ...
0
votes
0answers
13 views
Using 2 template files for the site blog
Ok so I have a blog on http://sergedenimes.com/blog/
The default template is a grid of images. I have a link in this page so if users want to switch to the normal list view they can click it. This ...
0
votes
2answers
20 views
Override Taxonomy Template
I'm trying to list all the products tied to a specific taxonomy. For some reason the template won't work when trying to access "http://www.myexample.com/product_categories/funiture/", I tried ...
-3
votes
0answers
15 views
.textwidget div has ridiculous width for some reason [closed]
I have custom made sidebars, and tried testing them, however main sidebar (on the right) doesn't look like it should do, I assume this is because .textwidget div generated by wordpres has width of ...
0
votes
1answer
30 views
How to retrieve depth of menu into template
In wp_nav_menu i use for the menu, with custom walker, i can get the $depth parameter in the start_el function
function start_el(&$output, $item, $depth, $args)
but, outside this ...
0
votes
0answers
26 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 ...
0
votes
0answers
16 views
Different template and themes visible for different users
I'm trying to accomplish the following task:
Create a WP installation which will allow different users to:
see and manage posts and pages created only by them
see and change templates of their ...
0
votes
0answers
11 views
I need to include post template into home template
i need to include "blog_page_2_column.php" into homepage.
I do this, insert this
into homepage template, works fine but i cant change the page of blog...
Any idea?
The web is ucrburna2013.com.ar
Thx
0
votes
0answers
17 views
home.php and the first page of the archive
I have a home.php template file in our Wordpress blog that displays a special first page as the front page of our blog (Short post excerpts, posts from categories, photos, etc, etc).
Now I want to ...
0
votes
0answers
17 views
Taxonomy page to display top level category as field
i thought I had my issue fixed but I found out that it isn't.
I have code in the sidebar of my archive template that only displays the parent taxonomy terms as links to take you to the taxonomy ...
0
votes
1answer
28 views
Template with Custom Post Type (Custom Tables) does not work
I'm using a Custom Post Type (CPT) my-project stored in a custom table MY_PROJECT.
Here is the CPT registering code:
$labels = array(
'name' => __( 'Projects ' ),
...
0
votes
0answers
22 views
Displaying hierarchical taxonomy terms on taxonomy template
Sorry if this is a little long but it is somewhat complex. I thought I was going down the right path. Here it is. I have created a custom post type and a custom taxonomy for it named location. In this ...
0
votes
1answer
18 views
Group pages by custom field values
I plan to have each individual product as a page, with custom fields for : Brand, size, feature 1 and feature 2.
My question:
Will it be possible to build a summary page template say for Brand, ...
2
votes
1answer
38 views
Test if page is child and has children, if so echo child pages also on grandchild pages
I am trying to show a sub-menu of child-pages only on level 2 pages (who have a parent) and if they have children. I am using the code below (made from several snippets I found), it works fine on ...
0
votes
0answers
20 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
3answers
37 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 ...
0
votes
1answer
31 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 ...
-1
votes
0answers
37 views
Static link in header.php only displays on single posts/pages
I would like to add a static link to my Wordpress theme's header.php file such that it appears on every page. However, after adding the new anchor element to the template, I find that it displays the ...
1
vote
1answer
53 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
16 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
0answers
47 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
17 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
1answer
34 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" ...
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 ...
-2
votes
0answers
26 views
Can we use 2 seo plugin at a time [closed]
in my blog i'm using 2 seo plugins, google xml sitemap generator and robots meta. the problem is if i use robots meta along with google xml sitemap generator, google is not indexing my blog post. will ...
4
votes
5answers
248 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 ...
0
votes
3answers
103 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.
...
1
vote
2answers
26 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
2answers
27 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 ...
2
votes
1answer
97 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 ...
3
votes
2answers
111 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 ...
-1
votes
1answer
32 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 !
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
33 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
2answers
30 views
Remove portion of header code from home page only
I have this code in the template file header.php:
<div class="dynamic-header">
<?php if(function_exists('show_media_header')){ show_media_header(); } ?>
</div>
I want to ...
0
votes
1answer
56 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
56 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
1answer
62 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
0answers
53 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
20 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 ...
0
votes
0answers
47 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
30 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
43 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
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 ...