Custom single post template following user
-
Hello,
It’s been a long time I didn’t come to the forum… hope you’ll be able to help me.
I’m trying to create a custom single post template that would be used only if the posts are seen by a specific user.For those who are interested here is the reason : I have a website presenting about 300 products (custom post type : product). I need to export all product detailed pages as PDF to use them as factsheets (for our salesmen) without the website Header, Footer, sidebar…
I found a way to create PDF from URLs thanks to Acrobat Pro which has this functionality : create a PDF or a list of PDF from url. I tried, it works, but of course, it renders the pdfs as they are shown in the browser : with all unnecessary parts (header, sidebar, links, footer,…). (it could have been the print version of the page which is already set to show only the interesting parts thanks to CSS).
So I thought I might create a “light” version of the single-product template and call that template instead of the regular one. This is where I’m stuck : Find a way to show the light version of the products, just to generate PDFs.
I thought there would be a way to tell wordpress to use the regular single product template for all visitors and the light version if I’m logged as a registered user called for example “PDF-Visitor”. But I can’t figure out how to do that.Sorry for my english and to write long sentences, I hope it’s clear enough to understand what I need.
Christophe
- The topic ‘Custom single post template following user’ is closed to new replies.