dtq26360 2017-01-25 22:12
浏览 262

创建一个完全空白的Wordpress页面

I am trying to create a completely blank WordPress page that has access to Woocommerce product data. I am creating a page that can be used to print part labels from Woocommerce. So I will pass the product's SKU to this "blank" page and then I want to access the database to pull in the relevant product description, part number, etc.

Basically what I need to know is what PHP needs to be at the top of the page so I can access the WordPress functions to access the DB and the appropriate PHP to query the relevant data from the DB.

Keep in mind this page should completely independent of any themes or other pages. It should be a totally blank page with no header, footer, background or anything else.

  • 写回答

1条回答 默认 最新

  • douliang1900 2017-01-25 22:25
    关注

    No Wordpress page is independent from themes. You have to create your own "minimalist" theme, the very least you need is an index.php and style.css files, including all the stuff that is required for a Wordpress theme to work.

    Of course you can create that without any layout etc., still you need to do it. Check https://codex.wordpress.org/Theme_Development for how to do it

    评论

报告相同问题?