Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can we handle the custom field in wordpress mean which db tables involves and which hooks we use to store custom fields?

user-image
Question ajoutée par shujaur Rahman , Senior software engineer(web developer) , Ikonami pvt limited
Date de publication: 2017/03/22
medhatmahmoud mahmoud
par medhatmahmoud mahmoud , Web Designer , Connect Computer Service Co

Displaying custom field:

for example to display custom fileds to each post use the the_meta() template tag.

the tag must be put within the loop in order to work

 

<?php the_meta(); ?>

alaa liswe
par alaa liswe , ِAdministrative Assistant , Arab Open University

https://codex.wordpress.org/Creating_Tables_with_Plugins

you can see this website

Kamal Hasija
par Kamal Hasija , Web Developer , The Brihaspati Infotech Pvt. Ltd.

The custom fields are stored in this table of WordPress wp_postmeta.  $wpdb->postmeta

For displaying you can use this, custom fields to each post use the the_meta() template tag.

the tag must be put within the loop in order to work

 

<?php the_meta(); ?>

e.g.

<?php $mykey_values = get_post_custom_values('my_key');foreach( $mykey_values as $key => $value ){ echo "$key => $value ('my_key')<br />";}?>

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?