Wordpress template names not appearing - php

I have been searching for answers to this problem for over 2 hours now and need help.
I have been working on a site for a client and want to make it into a wordpress them so that they can edit content without my help.
A few of the pages will need to have a template. So far I have 5 named custom templates within my theme.
Home Page
Support
Consultation
FAQ
Terminology
The pages are nested in different folders to create clean urls like so:
zulu_theme(main_dir)
zulu_theme/homepage.php (template name: homepage)
zulu_theme/consultation/index.php (template name: consultation)
zulu_theme/support/index.php (template name: support)
zulu_theme/support/faq/index.php (template name: faq, template name not showing)
zulu_theme/support/terminology/index.php (template name: terminology, template name not showing)
I have checked the problem files to see to see if I specified the name correctly. Both of them have /* Template Name: -template name */ correctly formatted on the second line of the document like the others.
I have tried changing the theme back to default and resetting it, however that doesnt work either.
I moved the zulu_theme/support/faq/index.php file to the theme folder to the zulu_folder/ and the faq name showed up, so I think that it is a permissions issue. However, when I check the folder and file permissions everything looks okay.
Has anybody else run into this issue, and found a solution?

I have tried using themes within 1 level of subfolders and they work. I haven't tried going further levels down but i think you should try keeping it simple. Also replace the file names with relavant names. If i was in your position i would try to use this structure.
zulu_theme/templates/homepage.php
zulu_theme/templates/faq.php
zulu_theme/templates/terminology.php
...

Related

WordPress single.php file

I need some help with how the setup for templates work for custom posts.
We have the following setup:
with Posts pointing to single.php which is fine. Then Services points to single-services.php and Stories points to single-stories.php.
I need to set up an Overseas Service custom post type which will have its own php file as the styling needs to be a specific way as it will incorporate a form that is only used here.
I duplicated the single-services.php file, as the base will look very similar to that, and called it single-overseas-service.php
I used the Toolset plugin to set up the new post type and the template is showing single.php and it can't be changed to a different file.
If someone could break down how best to do this, that would be great.
TIA,
Andy
This is caused by the - in your CPT's name. Change it to a _ or remove it altogether and you shouldn't have a problem.
eg, overseas_service and single-overseas_service.php

k2 module subtemplate doesn't pick up changes after editing - joomla 3.8.0

I hope some of you joomla enthusiast can help a beginner with a problem.
So I created a subtemplate for a k2 module in the folder templates/my_template/html/mod_k2_content. This folder contains the two subfolders Default (contains the default.php) and Team (contains the team.php).
The team.php file is the default.php file with minor changes. Everything worked fine and i could select the "Team" subtemplates in the joomla backend and it also showed the changes. Now I tried to edit the team.php in templates/my_template/html/mod_k2_content/Team again and it just doesn't pick up the changes anymore. When I edit the default.php in templates/my_template/html/mod_k2_content/Default it works just fine on the modules that work with the default subtemplate.
But the modules that have the Team subtemplate selected just stay the same, the way they were when i first selected this subtemplate for the modules.
Anybody that already enountered that problem and knows what I'm doing wrong?
I already reselected the team subtemplate several times and made sure I'm connected to the server. I also encluded a bunch of characters in the code to make the changes more visible, to make sure I'd truly notice them if the would be picked up. But nothing.
I'm really grateful if someone can help.
Thank you a lot!
Just to be sure: did you disable the caching on the website as well as the caching on your browser?
Okay i figured it out myself - The problem is that i can have different folders with different names in my templates/my_template/html/mod_k2_content folder, but each folder needs to contain a default.php. I renamed the team.php in my templates/my_template/html/mod_k2_content/Team folder to default.php and now the changes are being picked up !

Specific template for content type not working

I have a content type with a machine-readable name set to 'sbpage'.
In my theme folder under /templates I have created node--sbpage.tpl.php but this isn't getting loaded in as the template.
Separately I have node--course.tpl.php working for a content type named 'course'.
I've probably missed a step somewhere but it's driving me mad.
This is Drupal7, latest stable build.
I'd suggest to use Devel themer to have more information and track down which templates and suggestions have been fired.
The only thing I can think of on the top of my head is that you might have a node--nid.tpl.php overriding some particular nodes, that's the only thing that comes after they machine name type: https://api.drupal.org/api/drupal/modules!node!node.module/function/template_preprocess_node/7

Codeigniter/PyroCMS Extending use of files

I need to produce a few pages that will enable me to display lists of documents (.PDF)
What I want to know is there structure or the compatibility to use the file manager
Example:
I create a folder called animals and inside this folder I have a document called monkey.pdf and tiger.pdf
on the front end of my site I will have a page called articles -> This page will need to list all of the folders created in the file manager
When someone clicks the folder Animals I would like it to list all of the .pdfs within this specific category
Is this possible and could someone show me an example as I am confusing myself.
This is very much appreciated
I have had a thread reply from my query on the PyroCMS fourm.
This is possible it has just not been documented yet and you need to look in the files document for how it works.

problem with new content type created via module

I trying to write a drupal module. I'm following book "Learning Drupal 6 Module Development ". I have created a new content type (mybio)in module. I'm able create new node and edit node for new content type , it works fine but I'm not able to see new fields for mybio content type when viewing node.
I have placed mybio_info.tpl.php file in module folder and theme folder but nothing works.
Have you implemented the load hook and view hook?
Whenever you create new content types, you need to provide all hooks for changing / loading nodes, such as hook_delete(), hook_insert(), hook_load(), hook_update(), hook_validate() and hook_view().
If that doesn't work, are you sure your template is being used? If not sure, replace all its contents by something simple like '1' and see if that's being shown. If you don't see that, then it's not being used at all; try renaming to node-mybio.tpl.php.
For template naming, take a look at the Core templates and suggestions handbook page.
It looks like you did not implement hook_theme, so the system has no idea you are providing it with a template for this content type.
You can check whether this is the problem by displaying the theme registry using devel.module, or go further and use theme_developer module to check which template is used for everything on-screen.

Categories