Home > Not Working > Wordpress Custom Template Not Working

Wordpress Custom Template Not Working

Contents

This topic contains 6 replies, has 4 voices, and was last updated by gregH 2 years, 9 months ago. I've also heard some people considering this a "handy featured", rather than an issue. All templates, be it for single pages, headers, footers, archive pages, comments sections and so forth are supposed to be — and can only be, if I'm correct — in the an then create a new page testing. have a peek at this web-site

In my opinion, this isn't a bug. One of the problems I described was when people add a page with the same slug as the second part of your page template file name, e.g. Thanks for your help. You can even make a page template of archive.php or 404.php.

Wordpress Custom Template Not Working

it's simpler. December 13, 2011 at 9:54 pm #42575 Daniel Dvorkin Emilie, this is not hacky at all. Wordpress has a feature to redirect by page slug Herein lay the problem: It doesn't. We're moving support away from the forum and in to private tickets - Log In to Get Support Here Note: any currently open support threads in the community forum will stay

Single Pages The template hierarchy for pages does not follow the pattern for other post types. Please also read the forum guidelines.When asking your question/posting your request on the forum, please be as concise and specific as possible. In many, many cases this Page Template is in a file named page-contact.php. Keeping this part of the template hierarchy intact is — even though it might not reflect the underlying structure of WordPress — probably a good idea, as all current themes would break upon changing

Reply August 10, 2015 at 4:37 pm Tran Ngoc Tuan Anh says: Putting all page templates in a sub folder is my habit. Template Name Wordpress December 13, 2011 at 7:50 pm #42572 Emile It is checked but still not working, unfortunately. Plugins Support & Consult Writing Blog Articles Tutorials REST API Business Small Things Elsewhere WordPress REST API Exceed Expectations Course Modern Development Course Book Posts Contact Posted on May 1, 2014 Putting this issue into context, I will explain the problem with a common Page Template used by themes: a page template for a contact form.

The situation where the "single-post.php" template comes in handy is when you have multiple custom post types that are being displayed using"single.php" and you want to make changes to the view more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed WordPress does not work this way. I would strongly urge you to avoid using templates name for page slugs, as page slugs can change, while IDs should never change.

Template Name Wordpress

Anyway something to look into. Reply March 10, 2015 at 9:17 am Rarewave says: Yep, good point Jesper, it's something that I'm trying to get out of the habit myself since noticing a similar issue with Wordpress Custom Template Not Working If you insist on using the slug version, you will need to duplicate the template and change the copy's name to the translated slug. Wp Template Hierarchy That's huge when digging through code to make changes.

This site is not affiliated with the WordPress Foundation in any way. Check This Out The relationship between flat vector bundle and flat projective bundle How not to lose confidence in front of supervisor? 80s Sci-Fi movie with "fire-lion / fire-wolf" chasing people through locked steel WPML team is replying on the forum 6 days per week, 22 hours per day. Browse other questions tagged wordpress or ask your own question.

Reply April 11, 2013 at 3:41 pm Russell Heimlich says: Yup, good advice. Can you keep flying after being Restrained? February 11, 2014 at 11:07 pm #337887 gregH It's not "hacky" but it's not ideal either. http://trisystech.net/not-working/wp-pagenavi-not-working-with-custom-post-type.html WordPress Development Stack Exchange works best with JavaScript enabled Have you taken the WordPress 2016 Survey yet?

Well, for starters, it's highly confusing. 404.php for example, which is intended specifically when there is no post or any other type of content found, can actually be used for a It's not a field meant to hold two portions like that. The benefit to using tpl-*.php for me is that it keeps the templates together in the file view.

Skip to toolbar About WordPress About WordPress WordPress.org Documentation Support Forums Feedback Search Log In WordPress.org Search WordPress.org for: Showcase Themes Plugins Mobile Support Forums Documentation Get Involved About Blog Hosting

Do n and n^3 have the same set of digits? This is why "page-{page-slug}.php"and "page-{page-id}.php" templates are not commonly used. Awesome! The naming of Page Templates has lead people to believe that it is good practice to name their page templates page-{templatename}.php.

With the page- prefixing method, one basically needs to go poke around all the file system folders and sub-folders to check which templates have been provided. About this Plugin Custom Post Type UI Support Threads Reviews Topic Info In: Plugins and Hacks 2 replies 2 participants Last reply from: Michael Beckwith Last activity: 1 month, 2 weeks asked 2 years ago viewed 863 times active 2 years ago Upcoming Events 2016 Community Moderator Election ends in 6 days Blog How We Make Money at Stack Overflow: 2016 Edition http://trisystech.net/not-working/template-directory.html Trac UI Preferences Download in other formats: Comma-delimited Text Tab-delimited Text RSS Feed About Blog Hosting Jobs Support Developers Get Involved Learn Showcase Plugins Themes Ideas WordCamp WordPress.TV BuddyPress bbPress WordPress.com

when the slug of their page is contact and you have a page template named page-contact.php. Sub-folders would be much better to organise files. Viewing 2 replies - 1 through 2 (of 2 total) You must be logged in to reply to this topic. I am doing this in WordPress, because it seems the organisation of WordPress files in a theme is bad!

share|improve this answer answered Jul 17 '12 at 16:11 mrwweb 6,59411955 add a comment| up vote 0 down vote A safe way to create page templates is to copy an existing Though this will work, it does not address the bigger point here: WordPress needs regulation for the naming of Page Templates. After investigations I found, "pagetwo" in url "yoursite.com/pagetwo" detected as category name in class-wp.php/parse_request(). when i open http://www.mysite.com/teachers this works… if i open http://www.mysite.com/teachers/nice_name a 404 page appears.

Let us know! Conditional Tags… Normally I end these posts with a discussion of how to use conditional tags to avoid creating separate templates. Thank you, Rob Back to top Quote MultiQuote #7 Elise Alley Elise Alley iThemes Support AdministratorsOthers: All Plugins, All Themes, Members, Moderators, Toolkit, Webdesign 6,668 posts LocationOklahoma City, OK Posted Where custom post types have template file names single-{post_type}.php for displaying posts of a specific post type, pages use page.php, where we may expect single-page.php as page is a post type.

Subscribe to WPML Popular support subjectsPopular support subjectsBrowser Language Redirection SupportBuddyPress Multilingual SupportCompatibilityEmbedded InstallerGravity Forms Multilingual SupportHelp on using icl_register_string and icl_t functionshreflangICL_LANGUAGE_CODE related supportInstall and upgradeLanguage configuration file support topicsLanguage Alphabetically permute a string Extract result of Reduce when solving an inequalities Do the guest schools spend an entire academic year in the host school during the Triwizard Tournament? URL structures like this aren't as simple as they theoretically could be, and also part of why we don't have a lot of rewrite-based things in the plugin. Does the transaction show in PayPal?And are you currently working in Sandbox mode?

Try to open url: yoursite.com/pagetwo - 301 moved Set custom permalink structure to /%category%/%postname%/. Is there any chance this is getting fixed in a next release? In order for pages to be the fallback rules, WordPress would have to check to see if the category exists, the post exists, and the post is in the category, before Here's the SQL query… SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_page_template'; Reply April 11, 2013 at 4:06 pm Paul says: Interesting, I hadn't thought of this.