How to save "non-serial" information in wordpress

0

Next, I'm a designer and I have to turn here in the back end of life in what I can do, so I beg your pardon for using "no seriais" ...

I know that in Wordpress it is possible to save the data using post type (custom post type). But I wanted to know if it is possible, or let me know at least the north way, a way for me to save Address type information, phones and talz. Type, which does not need a loop

I know I can be mistaken, and the post type and loops are perfect for this. But for example, I have to repeat the address and phones in various places of a theme, what would be the most correct way to do this?

The problem is that I lack vocabulary to ask and even look for this type of solution.

    
asked by anonymous 28.01.2015 / 16:38

2 answers

0

Your question was a bit confusing because you may have multiple answers depending on how you use these data.

If the data you want to repeat several times in the theme will never be changed, you can use direct implementation in the code. This can work if you want to enter an information that the theme user will not change place or information. All you need to do is create a php file and include it anywhere you want in the theme, as long as the site accepts a direct html output.

Let's say the information is:

Address: Rua dos Bobos, nº0 Phone: (99) 32345678 "

You should create the file "info.php":

<?php 
echo 'Endereço: Rua dos bobos, nº0 <br/>
Telefone: (99) 32345678';
?>

And include it:

<?php include 'caminho_para_o_arquivo/info.php'; ?>

When you need to change the data, you can change info.php and all places where it was added will be changed.

You can also include this file from another location. This works well for website signing for example when you need to change some of your information on multiple sites at the same time.

<?php include 'https://meusite.tld/info.php'; ?>

It is important that this inclusion is done with SSL so that sites that use SSL are not vulnerable and present their information correctly.

    
08.02.2015 / 02:09
0

What you want to do is soft with these two free plugins: link With this you create for example a Post Type called "Agenda".

And with this other you create the fields link For example phone, image, address, website url, etc. And then when creating the ACF fields vc says they will be used in the Post Type "Agenda".

The documentation of both plugins above is quite complete. Mastering them you do it there in a matter of minutes with WordPress!

    
14.09.2016 / 10:23