{"id":7010,"date":"2017-03-28T16:18:12","date_gmt":"2017-03-28T16:18:12","guid":{"rendered":"https:\/\/jsmwebsolutions.com\/blog\/?p=7010"},"modified":"2017-03-28T16:18:51","modified_gmt":"2017-03-28T16:18:51","slug":"how-to-create-concrete5-theme","status":"publish","type":"post","link":"https:\/\/jsmwebsolutions.com\/blog\/how-to-create-concrete5-theme\/","title":{"rendered":"How To Create Concrete5 Theme"},"content":{"rendered":"<p>\n\t<strong>How to create concrete5 theme<\/strong>: <strong>Concrete5 <\/strong>is a&nbsp;free&nbsp;and&nbsp;open source<strong>&nbsp;<\/strong>content management systems <strong>Concrete5 is very easy and user friendly CMS<\/strong>, <u><strong>Concrete5 <\/strong>has been around since 2008<\/u>. <strong>Concrete5 <\/strong>is developed from the ground up using <em><strong>Model View Controller<\/strong><\/em> and <em>Object Orientated Programming<\/em> architecture and because of this, it is a powerful, easy to use CMS. PHP was used to create the structure of <strong>Concrete5 <\/strong>and it is often compared to the major CMS&rsquo;s which are WordPress, Joomla and Drupal. I personally have created many websites using <strong>Concrete5 <\/strong>and for creating custom themes I found the process more straight forward than other content management systems such as WordPress.\n<\/p>\n<p>\n\t<strong>How to create concrete5 theme <\/strong>?\n<\/p>\n<p>\n\tAssuming that you have correctly setup the SQL database and installation, it is fairly simple to create your own custom theme for Concrete5. For my example, I will show how to setup a theme with Bootstrap.\n<\/p>\n<ol>\n<li>\n\t\tFirstly, Setup Your File Structure FOR How to create <strong>concrete5 theme<\/strong>\n\t<\/li>\n<\/ol>\n<p>\n\tUsually, this will include the four file directories: css (i.e. Bootstrap files and Style Sheets), docs (optional), img and js (i.e. Bootstrap files).\n<\/p>\n<p>\n\t<a href=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/How-to-create-concrete5-theme.jpg\"><img fetchpriority=\"high\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7011\" height=\"588\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/How-to-create-concrete5-theme.jpg\" width=\"655\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/How-to-create-concrete5-theme.jpg 655w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/How-to-create-concrete5-theme-300x269.jpg 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/How-to-create-concrete5-theme-468x420.jpg 468w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/a>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<ol start=\"2\">\n<li>\n\t\tCreate a&nbsp;<strong>default.php <\/strong>file\n\t<\/li>\n<\/ol>\n<p>\n\tThe Default PHP file is used for <strong>Concrete5 pages<\/strong> that have no Page Type, for example the home\/index page. If you are converting your HTML website into a <strong>Concrete5 site<\/strong>, simply copy your code over to a new file called defualt.php. The file will be very similar to ordinary HTML files apart from a few php snippets that you must include for the CMS to be able to read the file and put sections in the correct place for editing.\n<\/p>\n<p>\n\tFirst of all, within your tags, you must include\n<\/p>\n<blockquote>\n<p>\n\t\t<strong>Loader::element(&lsquo;header_required&rsquo;)<\/strong><strong>; <\/strong>\n\t<\/p>\n<\/blockquote>\n<p>\n\t, which grabs a file called header_required from the concrete elements, which inserts the page title, the content type and the character set. For the later versions of Concrete5, you must now include a footer element, which is placed just before the end body tag as so:\n<\/p>\n<blockquote>\n<p>\n\t\t<strong>Loader::element(&lsquo;footer_required&rsquo;); <\/strong>\n\t<\/p>\n<\/blockquote>\n<p>\n\tFinally, for <strong>Concrete5 <\/strong>to read your external resources, you need to insert a PHP snippet within the link or script source.\n<\/p>\n<blockquote>\n<p>\n\t\t<strong>echo $this-&gt;getThemePath()?<\/strong>\n\t<\/p>\n<\/blockquote>\n<p>\n\t<a href=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme.jpg\"><img decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7012\" height=\"683\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme.jpg\" width=\"858\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme.jpg 858w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme-300x239.jpg 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme-768x611.jpg 768w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme-696x554.jpg 696w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-theme-528x420.jpg 528w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a>\n<\/p>\n<p>\n\tNow we have setup the base, we now need to setup editable areas on the page. These editable areas allow you to insert plugins, content or html code from within the CMS. Using Bootstrap, you can either setup the grid layout through the page type or just set one area and within Concrete5, use the HTML tool to setup your grid layout. To add an editable area, simply include the following between tags:\n<\/p>\n<blockquote>\n<p>\n\t\t&nbsp; &nbsp;$a = new Area(&lsquo;Area Name&rsquo;);<br \/>\n\t\t$a-&gt;display($c);\n\t<\/p>\n<\/blockquote>\n<p>\n\tBelow is an example with Bootstrap grid layout included (within body tags):\n<\/p>\n<p>\n\t<a href=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5.jpg\"><img decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7013\" height=\"564\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5.jpg\" width=\"591\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5.jpg 591w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-300x286.jpg 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/concrete5-440x420.jpg 440w\" sizes=\"(max-width: 591px) 100vw, 591px\" \/><\/a>\n<\/p>\n<p>\n\tObviously you can play around with the Bootstrap layout to your own preference, but remember to change the name of the area, unless you intend to duplicate them.\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<ol start=\"3\">\n<li>\n\t\tCreate&nbsp;<strong>view.php<\/strong>\n\t<\/li>\n<\/ol>\n<p>\n\tThe View PHP file is require to wrap single page types single pages or non theme pages. For example, if you intend to create blogs, then this file will be used as the page type.&nbsp;In view.php instead of main content area you put code\n<\/p>\n<p>\n\tprint $innerContent;\n<\/p>\n<ol start=\"4\">\n<li>\n\t\tCreate&nbsp;<strong>description.txt<\/strong>\n\t<\/li>\n<\/ol>\n<p>\n\t<strong>Concrete5 <\/strong>requires a text file with a description of your theme, therefore, on the first line you will put the title of the theme, and on the second line include a brief description of the theme.\n<\/p>\n<ol start=\"5\">\n<li>\n\t\tActivate The Theme in Concrete5\n\t<\/li>\n<\/ol>\n<p>\n\tOnce you have uploaded the theme into the correct directory&nbsp;(public_html -&gt; themes -&gt; (Your Theme Name) -&gt; [Place Here])&nbsp;you will then need to activate it through Concrete5. To do this, click on &ldquo;Dashboard&rdquo; and then &ldquo;Themes&rdquo; and you should see you theme with the title you from&nbsp;description.txt. Install the theme and then activate it, which you should then be greeted with a success message. Your theme is then successfully installed.\n<\/p>\n<ol start=\"6\">\n<li>\n\t\tMultiple Page Types\n\t<\/li>\n<\/ol>\n<p>\n\tIn many cases, its easier to create a new page type for a certain type of page that will be replicated in multiple ways i.e. a location landing page. Therefore, following the same format as default.php, simply create another PHP file and upload it to the server. To use the template through Concrete5, you will then need to add it as a Page Type through&nbsp;Dashboard -&gt; Themes -&gt; Add Page Type.&nbsp;Call the Page Type any name, but the package the name of the PHP file that you uploaded to the server.\n<\/p>\n<p>\n\t<a href=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5.jpg\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-7014\" height=\"620\" src=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5.jpg\" width=\"961\" srcset=\"https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5.jpg 961w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5-300x194.jpg 300w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5-768x495.jpg 768w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5-696x449.jpg 696w, https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-page-in-Concrete5-651x420.jpg 651w\" sizes=\"(max-width: 961px) 100vw, 961px\" \/><\/a>\n<\/p>\n<p>\n\tNOTE: Before editing the the default settings of the page type, its important to clear cache, otherwise you will be greeted with the default.php.\n<\/p>\n<p>\n\tIf you want to create<strong> concrete5 website<\/strong> contact jsm team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to create concrete5 theme: Concrete5 is a&nbsp;free&nbsp;and&nbsp;open source&nbsp;content management systems Concrete5 is very easy and user friendly CMS, Concrete5 has been around since 2008. Concrete5 is developed from the&hellip;<\/p>\n","protected":false},"author":1,"featured_media":7015,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[58,13],"tags":[287],"class_list":["post-7010","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-tutorials-help-fix-bugs","tag-how-to-create-concrete5-theme"],"rttpg_featured_image_url":{"full":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false],"landscape":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false],"portraits":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false],"thumbnail":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5-150x150.jpg",150,150,true],"medium":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5-300x225.jpg",300,225,true],"large":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false],"1536x1536":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false],"2048x2048":["https:\/\/jsmwebsolutions.com\/blog\/wp-content\/uploads\/2017\/03\/add-new-theme-in-concrete5.jpg",640,480,false]},"rttpg_author":{"display_name":"Aj","author_link":"https:\/\/jsmwebsolutions.com\/blog\/author\/admin\/"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/jsmwebsolutions.com\/blog\/category\/how-to\/\" rel=\"category tag\">How to<\/a> <a href=\"https:\/\/jsmwebsolutions.com\/blog\/category\/tutorials-help-fix-bugs\/\" rel=\"category tag\">Tutorials<\/a>","rttpg_excerpt":"How to create concrete5 theme: Concrete5 is a&nbsp;free&nbsp;and&nbsp;open source&nbsp;content management systems Concrete5 is very easy and user friendly CMS, Concrete5 has been around since 2008. Concrete5 is developed from the&hellip;","_links":{"self":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7010"}],"version-history":[{"count":3,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7010\/revisions"}],"predecessor-version":[{"id":7018,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7010\/revisions\/7018"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media\/7015"}],"wp:attachment":[{"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jsmwebsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}