
{"id":1562,"date":"2014-03-24T19:55:52","date_gmt":"2014-03-24T22:55:52","guid":{"rendered":"http:\/\/www.beprosoftware.com\/?p=1562"},"modified":"2014-10-04T16:54:10","modified_gmt":"2014-10-04T20:54:10","slug":"custom-listing-templates","status":"publish","type":"post","link":"https:\/\/beprosoftware.com\/documentation\/custom-listing-templates\/","title":{"rendered":"Custom Listing Templates"},"content":{"rendered":"<p>The listing results in BePro Listings are built via a <strong>dynamic template system<\/strong>. This makes it super easy to create your own if you are a php developer. This level of customization is an intermediate level job.<\/p>\n<h2>WE CAN DO IT<\/h2>\n<p>If you know what you want but don&#8217;t know how to code, then simply purchase <a title=\"wordpress development service\" href=\"http:\/\/www.beprosoftware.com\/shop\/wordpress-development-1hr\/\">1hr of\u00a0wordpress Development<\/a><\/p>\n<h2>THE PROCESS<\/h2>\n<p>The process itself is fairly strait forward. A) You need a template file with wordpress hooks. B) You need a list of functions which are fired when your template file is called C) You need a css stylesheet that will be loaded with your template. Here is an example of our template in templates\/listings\/generic_1.php<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&lt;div class=&quot;shortcode_results_2&quot;&gt;&lt;!--?php\r\ndo_action( 'bepro_listings_list_above_title', $result );\r\ndo_action( 'bepro_listings_list_title', $result);\r\ndo_action( 'bepro_listings_list_below_title', $result);\r\ndo_action( 'bepro_listings_list_above_image', $result);\r\ndo_action( 'bepro_listings_list_image', $result);\r\ndo_action( 'bepro_listings_list_after_image', $result);\r\ndo_action(&quot;bepro_listings_list_content&quot;, $result);\r\ndo_action(&quot;bepro_listings_list_end&quot;, $result);\r\n?--&gt;\r\n&lt;div style=&quot;clear: both;&quot;&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;<\/pre>\n<p>You will notice our template file is as simple as it comes. A few html declarations for our stylesheet to focus on and the wordpress action hooks. That&#8217;s it, like we said, easy.<\/p>\n<h2>THE FUNCTIONS<\/h2>\n<p>Once you have the template file, you have <strong>figured out <\/strong>the hardest part. All you need to do now, is tell us, which functions to fire for each of the action hooks in your template file. Of course, they are your functions, so they will show whatever you want when they are called.<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$data = get_option(&quot;bepro_listings&quot;);\r\n$data['bepro_listings_list_template_2'] = array(\r\n&quot;bepro_listings_list_title&quot; =&gt; &quot;bepro_listings_list_title_template&quot;,\r\n&quot;bepro_listings_list_below_title&quot; =&gt; &quot;bepro_listings_list_category_template&quot;,\r\n&quot;bepro_listings_list_above_title&quot; =&gt; &quot;bepro_listings_list_image_template&quot;,\r\n&quot;bepro_listings_list_image&quot; =&gt; &quot;bepro_listings_list_geo_template&quot;,\r\n&quot;bepro_listings_list_content&quot; =&gt; &quot;bepro_listings_list_content_template&quot;,\r\n&quot;bepro_listings_list_end&quot; =&gt; &quot;bepro_listings_list_links_template&quot;,\r\n&quot;style&quot; =&gt; plugins_url(&quot;css\/generic_listings_2.css&quot;, __FILE__ ),\r\n&quot;template_file&quot; =&gt; plugin_dir_path( __FILE__ ).'\/templates\/listings\/generic_1.php');\r\nupdate_option(&quot;bepro_listings&quot;, $data);\r\n<\/pre>\n<p>So there you have it. Give your template a number, it obviously cannot be 1 or 2. It can however be whatever characters you want it to be. Don&#8217;t try spaces. For an example, your template can be called, bepro_listings_list_template_greatestPluginsTemplateEver, in which case, your declaration would start like this<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n$data['bepro_listings_list_template_greatestPluginsTemplateEver'] = array(...\r\n<\/pre>\n<p>Which would result in a shortcode looking like,<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">[display_listings type=&quot;greatestPluginsTemplateEver&quot;]<\/pre>\n<p>For the rest of the array, on the left you have the hook that&#8217;s in your template file. On the right, you have the function you want called. The last 2 options are the css stylesheet and the template file. Neither are mandatory; However, if you are going to use them, simply tell us where the files are.<\/p>\n<h2>CONCLUSION<\/h2>\n<p>We are working on ways to make this a drag and drop solution. However, for now, creating a new template for BePro Listings is a job for a novice developer. If you would like to create your own templates for BePro Listings, its as easy as A, B, C.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The listing results in BePro Listings are built via a dynamic template system. This makes it super easy to create your own if you are a php developer. This level of customization is an intermediate level job. WE CAN DO IT If you know what you want but don&#8217;t know how to code, then simply&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[59],"tags":[19,169,92],"class_list":["post-1562","post","type-post","status-publish","format-standard","hentry","category-bepro-listings-plugins-2","tag-bepro-listings","tag-dynamic","tag-templates","category-59","description-off"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Custom Listing Templates - Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Custom Listing Templates - Documentation\" \/>\n<meta property=\"og:description\" content=\"The listing results in BePro Listings are built via a dynamic template system. This makes it super easy to create your own if you are a php developer. This level of customization is an intermediate level job. WE CAN DO IT If you know what you want but don&#8217;t know how to code, then simply&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/\" \/>\n<meta property=\"og:site_name\" content=\"Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-24T22:55:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-10-04T20:54:10+00:00\" \/>\n<meta name=\"author\" content=\"BePro Software Team\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"BePro Software Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/\",\"url\":\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/\",\"name\":\"Custom Listing Templates - Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/#website\"},\"datePublished\":\"2014-03-24T22:55:52+00:00\",\"dateModified\":\"2014-10-04T20:54:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/#\/schema\/person\/96560a18e84b6d1d52fd4b5439c3e0ef\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.beprosoftware.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom Listing Templates\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/#website\",\"url\":\"https:\/\/www.beprosoftware.com\/documentation\/\",\"name\":\"Documentation\",\"description\":\"BePro Software Product Documentation\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.beprosoftware.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.beprosoftware.com\/documentation\/#\/schema\/person\/96560a18e84b6d1d52fd4b5439c3e0ef\",\"name\":\"BePro Software Team\",\"description\":\"BePro Software is a Canadian company providing managed hosting, operational support, and long-term stewardship for business-critical websites and digital systems. We specialize in maintaining and operating platforms built by others, focusing on stability, security, accessibility, and continuity rather than one-off development. BePro Software is owned and operated by Beyond Programs Ltd and is based in British Columbia, Canada. Contact us on FolioProjects @BeproSoftware\",\"sameAs\":[\"http:\/\/beprosoftware.com\",\"https:\/\/x.com\/beprosoftware\"],\"url\":\"https:\/\/beprosoftware.com\/documentation\/author\/manager\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Custom Listing Templates - Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/","og_locale":"en_US","og_type":"article","og_title":"Custom Listing Templates - Documentation","og_description":"The listing results in BePro Listings are built via a dynamic template system. This makes it super easy to create your own if you are a php developer. This level of customization is an intermediate level job. WE CAN DO IT If you know what you want but don&#8217;t know how to code, then simply&hellip;","og_url":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/","og_site_name":"Documentation","article_published_time":"2014-03-24T22:55:52+00:00","article_modified_time":"2014-10-04T20:54:10+00:00","author":"BePro Software Team","twitter_misc":{"Written by":"BePro Software Team","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/","url":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/","name":"Custom Listing Templates - Documentation","isPartOf":{"@id":"https:\/\/www.beprosoftware.com\/documentation\/#website"},"datePublished":"2014-03-24T22:55:52+00:00","dateModified":"2014-10-04T20:54:10+00:00","author":{"@id":"https:\/\/www.beprosoftware.com\/documentation\/#\/schema\/person\/96560a18e84b6d1d52fd4b5439c3e0ef"},"breadcrumb":{"@id":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.beprosoftware.com\/documentation\/custom-listing-templates\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.beprosoftware.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Custom Listing Templates"}]},{"@type":"WebSite","@id":"https:\/\/www.beprosoftware.com\/documentation\/#website","url":"https:\/\/www.beprosoftware.com\/documentation\/","name":"Documentation","description":"BePro Software Product Documentation","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.beprosoftware.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.beprosoftware.com\/documentation\/#\/schema\/person\/96560a18e84b6d1d52fd4b5439c3e0ef","name":"BePro Software Team","description":"BePro Software is a Canadian company providing managed hosting, operational support, and long-term stewardship for business-critical websites and digital systems. We specialize in maintaining and operating platforms built by others, focusing on stability, security, accessibility, and continuity rather than one-off development. BePro Software is owned and operated by Beyond Programs Ltd and is based in British Columbia, Canada. Contact us on FolioProjects @BeproSoftware","sameAs":["http:\/\/beprosoftware.com","https:\/\/x.com\/beprosoftware"],"url":"https:\/\/beprosoftware.com\/documentation\/author\/manager\/"}]}},"_links":{"self":[{"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/posts\/1562"}],"collection":[{"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/comments?post=1562"}],"version-history":[{"count":0,"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/posts\/1562\/revisions"}],"wp:attachment":[{"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/media?parent=1562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/categories?post=1562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beprosoftware.com\/documentation\/wp-json\/wp\/v2\/tags?post=1562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}