Giter Club home page Giter Club logo

wp-template-preview's Introduction

WP Template Preview

Finally! It's here :D

Improve your theme UX by providing a preview image of your custom page templates of any post type. You can use this plugin as plugin obviously but if you want you can easily integrate this plugin with your theme or you can just use the class throwing the directory far away.

How To Add Preview Image?

Along with the regular custom template header just add another header key Preview Image. And then pass the image source as the value of Preview Image. Make sure image source is relative to your theme directory. You can change the header key using filter hook wp_template_preview_header or you can hack the source code if you are going to tightly integrate this plugin with your theme. Please check the following code to understand the header key: value relation clearly.

<?php
/**
 * Template Name: Right Sidebar
 * Preview Image: assets/images/template-preview/right-sidebar.png
 */

How To Preview Your Page Applying Any Custom Page Template?

You will see a link Template Preview just above the page template dropdown list. Select a template from the list and click on Template Preview link.

Preview In Action

WP Template Preview In Action

Template Preview Link

Feedback

Liked this? Then don't forget to give me a star :D, it'll inspire me. And if you wanna share your tought or have any idea that you wanna discuss then here I'm!

Contributors

wp-template-preview's People

Contributors

obiplabon avatar onetarek avatar

Stargazers

Md Abul Bashar avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.