Answer the question
In order to leave comments, you need to log in
Need help writing a wp plugin. How to properly integrate external pages in wp?
The question has already been . The bottom line is that it was required to integrate a product catalog with its own database with the wp engine with wp. I'll tell you briefly, there is a database with goods that are replenished / deleted daily. single item. Two tables of the store base are used, this is a table with goods and a table with categories. The option of combining the wp base and the store base into one has disappeared. The easiest way is to inject your code with product display, categories into the wp theme without touching the wp code too much. In fact, these are "three" files:
product - displays product data
v_cat - displays products of a certain category
search - displays products by the word in the search
Actually everything is implemented crookedly, as far as knowledge and time was enough, namely:
three files product, v cat and search are located in the root of the site, at the very beginning they contained:
<?php
require( dirname( __FILE__ ) . '/wp-blog-header.php' ); //загрузки фронтенда
include(TEMPLATEPATH."/product.php"); //подключение файла в теме с кодом страницы
?>
<?php
require_once(dirname( __FILE__ ) . '/wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();
$wp->send_headers();
//
include(TEMPLATEPATH."/product.php");
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question