- AuthorPosts
- March 13, 2018 at 3:43 pm #22849Anonymous UserMember
Hi, I’m designing a webpage in BoldGrid with the Evolv Theme. For one of my pages, I’d like to create a custom template, so that I can add some custom PHP to my page (as is common in WordPress). Currently I don’t have any trouble creating a template, but when I select it, my page doesn’t load beyond the header. In fact, it loads the header infinitely, which means I have to stop loading the page. The strange thing is that I’ve only added a comment to the original code, like so:
<?php /* Template Name: Project_Page */
/**
*
*
* This file contains the base structure of a BoldGrid Theme.
*
* @since 2.0
* @package Prime
*/instead of:
<?php
/**
* Base Template
*
* This file contains the base structure of a BoldGrid Theme.
*
* @since 2.0
* @package Prime
*/Otherwise, the two pages are identical.
Could anyone explain to me why I’m getting an infinite header load?
March 14, 2018 at 9:46 am #22850Arnel CMemberHello,
If you are making a change like this to the theme, we highly recommend using a child theme instead of changing the actual theme. However, given that you changed the header comment area it shouldn’t be causing a problem. I looked at your code and there is a minor difference. You used a typical PHP comment syntax of “/*” whereas the original code uses something different – “/**”. I looked up the PHP manual on comments on found that there is a small possibility in the difference. Here’s the statement about the “/**” that I found in the PHP manual:
Comments in PHP can be used for several purposes, a very interesting one being that you can generate API documentation directly from them by using PHPDocumentor (http://www.phpdoc.org/).
Therefor one has to use a JavaDoc-like comment syntax (conforms to the DocBook DTD), example:
<?php
/**
* The second * here opens the DocBook commentblock, which could later on
* in your development cycle save you a lot of time by preventing you having to rewrite
* major documentation parts to generate some usable form of documentation.
*/
?>
Some basic html-like formatting is supported with this (ie <br< tags) to create something of a layout.I am going to submit this to the BoldGrid development team for a closer look, but I would first try changing that one little minor detail first and see if it doesn’t stop the abnormal behavior that you’re seeing. I also looked for other examples of something like this happening in WordPress, and there was one other example in theme (not part of BoldGrid). They suggested that the issue was a result of caching. They recommended clearing the cache and then reloading a normal theme before loading the original theme again. If I do get any further information on the issue, I will add a comment to this reply to provide you an update.
- AuthorPosts
- The topic ‘How to add custom page templates in Evolv theme’ is closed to new replies.