Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.
0
votes
0answers
16 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
13 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
14 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
14 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
26 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
17 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
34 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
35 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
34 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
52 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
43 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
16 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
30 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
25 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
171 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
91 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
25 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 ...
-1
votes
0answers
24 views
theme options panel [closed]
plz i need help to create simple options for a theme
this an example :
in theme i have this code
<div id="ticker-wrapper" class="no-js">
<ul id="js-news" class="js-hidden">
<?php ...
0
votes
2answers
26 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
89 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
98 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
29 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
29 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
54 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
39 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
58 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
48 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
46 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
28 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
39 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 ...
0
votes
1answer
52 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
67 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
0answers
20 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
50 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
27 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
32 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
2answers
106 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
117 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 ...