Within the context of WordPress Theme-ing, the term 'template' refers to PHP files used to display content.

learn more… | top users | synonyms (1)

0
votes
1answer
13 views

Add theme templates for child categories into the template hierarchy

in my site i have many category and subcategory (child category) say like my one category name Printing - 4 color - 2 color - offset print Exmple i want when visit 4 color category page it ...
-2
votes
0answers
9 views

Custom pages layout solution

I have been in wordpress dev business for more than a year, made few themes for some friends but one question always pops in my head when I see a PSD template: How to deal with multiple dynamic ...
-1
votes
0answers
13 views

Centre Portfolio Page

I can't figure out how to centre my portfolio page. My wordpress site is: kelly mulder Can any one help me in simple steps? Thanks :)
-1
votes
0answers
15 views

Wordpress presentation pages on envato

when I look on a theme presentation on Themeforest I see a lot of home/page samplings/contact samplings and blog/portofolio styles... I'm looking to make a theme... but, I feel discouraged when I see ...
2
votes
0answers
22 views

Change Theme from Plugin based on query_vars

I'm working from about 4 months on developing a Plugin. This plugin make in a page an entire app, using the powerful of Wordpress. So, I've decided to create a serires of rewrite rules using command ...
-2
votes
0answers
21 views

How can I disable author and hide their posts?

I want to disbale authors and after that they gonna be hide such as their posts, media and etc. also on the contrary of above , when i active authors their posts display to every one Any idea?
0
votes
1answer
22 views

Page template compatibility with different themes

I'm back to WordPress development after a long time away from it, and I'm currently writing a plugin for a client that I might find some use to some others. One part of the plugin includes a page ...
0
votes
1answer
17 views

Display content on Single page

I am building a single page theme, And I am having a problem with get_post_meta() The Problem This code bellow does not work, and I cannot see anything on the website as it's blank. Here is my index....
0
votes
1answer
5 views

Custom taxonomy query for a custom post type

I have a custom post type called news with a custom taxonomy called news category. Right now I have a template called taxonomy-news_category-press.php where press is one of the news_categories. The ...
0
votes
0answers
25 views

Create a Page (Template) based on a URL with other Post-Slugs

We are building a WordPress site based on a theme (Eduma) and a plugin (Learnpress). Nevertheless this question is just indirectly about that plugin, which is why I ask this question here. The plugin ...
0
votes
1answer
31 views

single- and archive- templates not being applied to custom post types, not even after flushing permalinks

As stated in the title, I'm unable to get the archive or single pages of my custom post type to use the correct templates for them. Funny thing is, they worked just fine on my virtual server (WAMP), ...
-1
votes
0answers
26 views

Woocommerce add to cart button doesn't work with custom templates

I'm using twig for my WP templates and they work just fine. I've installed WooCommerce and all its templates into my theme folder so that I can overwrite them. I'm not planning to use twig with ...
-2
votes
0answers
20 views

Timber, get an arbitrary permalink?

I have an array of post IDs that I'd like to retrieve the permalink for... is there a way to do this in timber? I have tried: {{ blog_post.link|e('url') }} and {{ blog_post.get_path|e('url') }} ...
0
votes
1answer
53 views

How to add search to menu?

How to add search to menu? I want to have: add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == '...
0
votes
3answers
45 views

Are there any downsides to not using get_header(), get_sidebar and get_footer()?

I am an experienced PHP developer and I am doing my first WordPress project. For reasons I am not going to go into, I don't want to use header.php, get_header(), sidebar.php, get_sidebar(), footer.php ...
0
votes
1answer
28 views

Shortcode call not working in WP Template

I'm working with a Visual Composer shortcode to call a text resizer into being. When using the Visual Composer or the classic WYSIWYG, if I insert it's shortcode [enlarge_text small='A' ...
0
votes
1answer
42 views

More than one text-domain is being used because of the included templates for plugins

I added bbPress and WooCommerce in my theme and override some templates too. These templates contains textdomains like bbpress and woocommerce. Unfortunately I got the following error in Theme-Check: ...
0
votes
0answers
21 views

Prevent the Loop from running on tags page

I wrote a custom post query for the tags page (tags.php), which queries all posts. I therefore do not need the Loop on that page, because it only queries those posts related to the tag. Is there any ...
0
votes
0answers
9 views

How to include siblings with children in multi-level accordion?

I followed bootstrap accordion tutorial and successfully works but I have four level hierarchical for example parent with children, children with child and on. I cant figure out how to write code that ...
0
votes
1answer
18 views

Conditional string comparison failing for basename/slug

I am trying to display a particular block of html for one page in particular. I have created a conditional statement that compares the basename of the page to my string. <?php if ( has_tag( '...
0
votes
0answers
9 views

Rewrite Rule for Multistep Estimate Form

I want to be able to create a few rewrite rules and utilize some templates that I've created, but I don't want to be limited by having to create the pages within the WordPress admin ... essentially, I ...
0
votes
0answers
48 views

Add two custom post type. News and Staff

I have installed the Bone Theme for Wordpress and I have successfully setup a custom post type for Staff (post) but when I tried to create another one for News, Wordpress crashed. What is the right ...
0
votes
2answers
43 views

Trying to edit the single page from a Custom Post

I have a custom post type where I can create pages in.("article.php") It automatically uses the template "single.php" when I create a page, although I want to change some things in it without ...
2
votes
0answers
22 views

Wordpress Template not affecting the working, keeps defaulting to the index.php template

I thought this would be incredibly simple, but it has not. I have an index.php file that has my default template for my site. I then made a new file called magazine.php for a template file so that I ...
-1
votes
1answer
70 views

Make a PHP file with a function

I want to use the breadcrumb function as listed here: https://gist.github.com/melissacabral/4032941 Putting the code in functions.php works for me, but I would rather have it in a separate PHP file. ...
0
votes
1answer
13 views

Newest comments first not working

I'd like to have my newest comments listed first but nothing seems to be working. In the dashboard I set In comments.php I have <?php wp_list_comments(array( 'reverse_top_level' => true, ...
1
vote
1answer
59 views

Use Timber/Twig to pull an image by image ID [closed]

Is it possible to use Twig to pull an image by ID, or only to pull the post.thumbnail? The Twig docs don't seem to cover any other image need and I'd like to specify a backup image in case no post....
8
votes
4answers
356 views

Prevent comments_template() to load comments.php

I'm developing a WordPress theme using a template engine. I want my code to be as much compatible as possible with WP core functionality. Some context first My first problem was to find a way to ...
3
votes
1answer
57 views

What is best way passing variables to theme templates and using them different places like widgets?

I have a template file at /parts/template.php which contains a post listing code like, echo get_the_title(); //same lines with my_render_function and i am using it at archive.php with this lines. ...
0
votes
1answer
28 views

How to add custom 'layout' buttons to wordpress editor?

I'd like to modify the editor by adding some 'layout' buttons. Ideally, I'd like to add the ability to add some html 'partial' by simply clicking a button. This is to help my client to create pre-...
0
votes
0answers
15 views

How to set the template of a page created via plugin with template inside plugin

I've been trying to make a plugin that creates a couple of pages and then sets their template. This issue is that I have the templates inside the plugin. To create the pages I'm using: $post = ...
1
vote
2answers
113 views

How to move page template to custom folder?

I created page template that uses the page slug, for example, page-contact.php, page-gallery.php etc How can I move these templates to a subfolder, for example /mytheme/pages/?
0
votes
3answers
47 views

How to create custom layouts and static pages in themes for clients

How do I build goodlooking, custom pages into my themes. I've decided to use underscores to create custom client themes, as I need complete freedom in design, and all the tutorials I've found on theme ...
4
votes
1answer
41 views

Executing Queries in tag.php

I'm probably being dense, but I can't seem to figure out what the issue here is. The site I'm developing uses a custom loop, with a query that excludes any posts ticked as archived. The reason I ...
0
votes
1answer
32 views

Wordpress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]

I downloaded a wordpress theme recently and i tried to run it but it gives me an fatal error shows that call to undefined fatal error(). Why this error generates ? I am a new bie to wordpress theme ...
0
votes
0answers
14 views

change template by permalink endpoint via plugin

I'm trying to change template using this code: add_filter( 'query_vars', 'add_query_vars'); function add_query_vars($vars){ $vars[] = "photos"; return $vars; } function ...
0
votes
1answer
54 views

How to customize search result page title?

I would like to customize the page title of the search result page: from: <title>Search Results for “search string” – Page 2 – Sitename</title> to: <title>“search string” result ...
1
vote
1answer
33 views

Get WordPress to use another custom “author.php” file (“custom-author-file.php”)

currently, this example code in WordPress: <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><?php the_author(); ?></a> turns into: <a href="http:/...
0
votes
0answers
46 views

Make shortcode work in all posts displayed by loop, not just the first one

I have a post archive displaying post and author meta at roadtripsharing.com/road_trip I added a do_shortcode(); in the loop, specifically related to the "New Message" button which opens a dialogue ...
0
votes
1answer
19 views

Remove “ Browse Category : ” from Archive title

I have the Shaped Blog theme and I try to remove "Browse Category:" from my Archive title. I look in the code and found in "template-tags.php" this code : ` //////////////////////////////////////...
0
votes
1answer
41 views

Custom post type with two templates

I have a custom post type with an archive-my-post-type page and now I need a second archive page without header and footer and with a custom content. So my question how can I create a second page ...
1
vote
2answers
85 views

if ( is_home() && ! is_front_page() )

I see the following code a lot in index.php files. I understand that is_front_page() returns true when viewing the Site Front Page (whether displaying the blog posts index or a static page), while ...
0
votes
1answer
26 views

Custom taxonomy returns 404

I'm getting a 404 page when I visit my custom taxonomy page. Custom taxonomy is called 'manufacturer'. I also have a cpt called 'product'. EDIT 1: It has something to do with the cpt rewrite. If I ...
0
votes
1answer
34 views

Archive for a Taxonomy of a Custom Post type

I have a situation like this: /disrupt-founders/disrupt-categories/help-me-be-healthier/ What I am wanting to do it create an archive page that is unique for the Taxonomy based on the Custom Post ...
0
votes
0answers
10 views

Short description under my content images MH Magazine Lite

Originally comments and the date the content was published was displayed under the image of my content however I used this code to change it to a short description. However only some of the ...
0
votes
1answer
28 views

Single Post Templates Doubt

While I was reading template hierarchy. The single post template file is used to render a single post. WordPress uses the following path: single-{post-type}-{slug}.php – (Since 4.4) First, WordPress ...
0
votes
1answer
31 views

What template is used for viewing Media Library Files?

I would like to create a special page template in my theme for viewing the media library files. Currently, when I click a Media Library image file I get a page template from the parent theme. Does ...
0
votes
0answers
13 views

Wordpress Bootstrap menus shifted to the right

Here is m development site url. development.lauterbachgroup.com as you can see the drop down menus are shifted to the right by what seems like a fixed amount. I have a solution to fix the issue by ...
1
vote
3answers
89 views

How to load different CSS in different Header?

I have two different files for the header in my theme. These are header.php and header-full.php. How can I load different CSS in different headers? I enqueue my CSS files in function.php like this:
1
vote
2answers
130 views

New template, where to place CSS?

Till today I never used header.php and footer.php because my theme has multiple templates and I do not know how or where to place the CSS and JS files. Could someone please explain how to have a ...