• Resolved franklin82

    (@franklin82)


    Hi,

    Firstly thank you! this plugin has saved me hours of custom work!

    I’ve modified the template to fit my needs but to avoid my changes being removed when the plugin updates where should I put my template?

    I’ve tried creating a folder within my theme called ‘acf-recent-posts-widget’ and then placing the templates in the root and that didn’t work I’ve also tried a sub directory called ‘templates’ but that didn’t work either.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rafa? Gicgier

    (@gicolek)

    Hey,

    Great to read that ??

    I am already out of the office and I need to take a look at the code to remind myself a bit on that part.

    I’ll get back to you tomorrow morning GMT +1.

    Cheers,
    Rafal

    Plugin Author Rafa? Gicgier

    (@gicolek)

    Hey @franklin82,

    As per the documentation, the correct paths are:

    From version 4.3 the plugin supports custom templates. To make usage of these one needs to make a copy of all the files found
    in the acf-recent-posts-widget/templates directory and copy them over to the active template directory to acfrpw subdirectory.
    The approach is similar to the way WooCommerce plugin works and has it’s drawbacks. With every new feature the files may be outdated.

    Similarly to the widget template files, a separate, custom markup can be created for the shortcode build post listing. Copy the acf-recent-posts-widget/template files
    to acfrpw-blog directory created inside your active theme directory.

    I’ve bolded these for you, hence the correct names of the directories are:

    acfrpw for the widget markup
    acfrpw-blog for the shortcodes markup.

    Sincerely,
    Rafa?

    Thread Starter franklin82

    (@franklin82)

    Hi @gicolek,

    Thanks for confirming, got it working now, I had kept the templates sub-directory which is why it wasn’t working.

    Thanks!
    Michael

    Plugin Author Rafa? Gicgier

    (@gicolek)

    Perfect! ?? Thanks for the info!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Template location’ is closed to new replies.