Wordpress content

Asked

Viewed 78 times

-3

Is there the possibility of Wordpress bringing information from the bank without being in the form of Posts? In case I want to make a site "conventional" as I would register and pull this information in WP?

  • Can you explain better how this is "in the form of posts"? And what technology will you use on the conventional site? It seems you want to register information outside the WP, it’s correct?

  • My knowledge in WP would be the basics of if haveposts() bla bla bla rs. But the site has information, which would not be displayed as posts but as common information. Information blocks.

  • All right, but then what you want is to pull the WP information inside a PHP site, for example? And regarding registration, what is your problem with the WP backend?

3 answers

1

From what I understand, you want to know how to use data from the custom database, that is to perform your own collection of information from the tables, or even from new tables that you need.

The necessary information on how to perform the CRUD functions in wordpress can be found at: http://codex.wordpress.org/Class_Reference/wpdb

1

A simple function to load the page content in wordpress would be like this:

The function:

function get_first_page_content($id){
    $page_id = $id;
    $page_data = get_page($page_id);
    return $page_data->post_content;
}

And the call inside the page:

<?php echo get_first_page_content($ID_PAGE);?>

0

You can create your custom tables within the Wordpress database without any problem and feed them with forms and whatever you want, and then fetch this information with the same ease through mysql, mysqli or pdo as you wish.

Additionally, you would be making a clone of page.php and renaming as page_custom.php and placing all necessary codes of requisições, html and css inside that file php then simply go to the administration of the Wordpress in Pages, you will create a page and call it what you want and then you will look for template of the page where you will choose the template created by yourself within the page_custom.php ... example:

<?php

      /* Template name: Page Custom */

      Todo o meu código personalizado aqui.

?>

Just like you said to choose your model Page Custom inside ...

Páginas > Nome da Minha Página > Dropdown Modelo de Página

Browser other questions tagged

You are not signed in. Login or sign up in order to post.