How to save information "not serials" in wordpress

Asked

Viewed 76 times

0

Next, I’m a designer and I have to manage here in the back-end of life in what I can do, so I apologize for using "would not be"...

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 inform me at least the way north, a way for me to save information like Address, phones and Alz. Like, you don’t need a "loop"

I know I may be roundly mistaken, and the post types and loops are perfectly suited to that. But for example, I have q repeat the address and phones in various places of a theme, which 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.

  • If one day you want to give up wordpress, this CMS is pretty cool: http://grabaperch.com. From what you said, it can work for your profile. It is paid, but the license is cheap and you can charge from your customer.

2 answers

0

What you want to do is soft with these two free plugins: https://wordpress.org/plugins/custom-post-type-ui/ With this vc creates for example a Post Type called "Agenda".

And with this other you create the fields https://wordpress.org/plugins/advanced-custom-fields/ For example phone, image, address, website url, etc. And then when creating the ACF fields you say they will be used in the Post Type "Agenda".

The documentation of both plugins above is quite complete. Mastering them vc does it ai in a matter of minutes with Wordpress!

0

Your question was a bit confusing because it may have several answers depending on the use of this data.

If the data you want to repeat several times in the theme will never be changed, you can use the direct implementation in the code. This can work if you want to enter information that the theme user will not change place nor the information. All you need to do is create a php file and include it wherever 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 Tel.: (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 the places where it was included will be changed.

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

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

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

Browser other questions tagged

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