• Resolved mak1wp

    (@mak1wp)


    Hi,

    Absolutely love the plugin Greg thank you.

    I’m having some difficulty moving some custom loop template files outside of the theme root directory.

    I’m trying to do this to keep the file structure tidy – as theres a few different loop layouts, and I’d prefer them in a template folder rather than the themes root.

    I’m able to specify the location – and select the template via the backend/page builder… but just get an empty page if the template is anywhere but the root directory? Could you help me address this?

    function get_loop_templates(){
    		$templates = array();
    
    		$files = glob(get_template_directory().'/loop-templates/*.php');
    		foreach($files as $file){
    			$templates[] = basename($file);
    		}

    shows in page builder – doesnt shwo in the front end

    $files = glob(get_template_directory().'/loop-*.php');

    shows in page builder and front end – but a bit messy when working with lots of custom loop layouts. Putting it into a folder would be a huge help.

    Many thanks in advance if you are able to help with this!

    https://www.ads-software.com/extend/plugins/siteorigin-panels/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author SiteOrigin

    (@gpriday)

    Good call @mak1wp! I’m working on this right now. It should be ready for the next version, but I’ll keep you updated.

    Plugin Author SiteOrigin

    (@gpriday)

    I have this working in my development version now. I just need to do some testing, but I should be releasing an update early next week.

    Thanks for the great idea! Please keep them coming ??

    Thread Starter mak1wp

    (@mak1wp)

    Hey! Awesome! ??

    Great work Greg, look forward to seeing how you’ve done it. Glad you like the idea.

    The purpose behind it was (other than to keep everything tidy) –

    I’ve duplicated the loop widget/function – modified it a little bit and limited it to a specific post type, in this instance, a custom portfolio post type I’ve created.

    I’ve done this as I’ve included a filterable isotope option, which pulls in the category filter functions, and works slightly differently to the standard loop templates.

    Thanks again for the help and quick reply!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loop outside of WP root’ is closed to new replies.