wmaraci reklam

bu görseldeki gibi nasıl yapabilirim acaba

7 Mesajlar 1.078 Okunma
pst.net
wmaraci reklam

Lokasyon123 Lokasyon123 İNTERAKTİF YAZILIM 80 TL Kullanıcı
  • Üyelik 11.04.2016
  • Yaş/Cinsiyet 28 / E
  • Meslek Ogrenci
  • Konum Edirne
  • Ad Soyad B** A**
  • Mesajlar 2883
  • Beğeniler 363 / 319
  • Ticaret 2, (%100)
merhaba






bu görseldeki gibi nasıl yapabilirim acaba bilginiz varmı varsa hangi kodları ekleyeceğim anlatırsanız yada kaynak gösteririrseniz sevinirim
 

 

https://wmaraci.com/forum/script-alisverisi/interaktif-sozluk-benzeri-php-pdo-yazilim-simdi-indirimde-533214.html
wmaraci
reklam

TEHET TEHET Kullanıcı
  • Üyelik 04.10.2014
  • Yaş/Cinsiyet 31 / E
  • Meslek Tasarımcı
  • Konum Ankara
  • Ad Soyad M** A**
  • Mesajlar 791
  • Beğeniler 96 / 374
  • Ticaret 1, (%100)
Kaynak: https://wpshed.com/wordpress/create-custom-meta-box-easy-way/
Örnek olarak;

function wpshed_get_custom_field( $value ) {
global $post;

$custom_field = get_post_meta( $post->ID, $value, true );
if ( !empty( $custom_field ) )
return is_array( $custom_field ) ? stripslashes_deep( $custom_field ) : stripslashes( wp_kses_decode_entities( $custom_field ) );

return false;
}

/**
* Register the Meta box
*/
function wpshed_add_custom_meta_box() {
add_meta_box( 'wpshed-meta-box', __( 'Film Bilgileri', 'wpshed' ), 'wpshed_meta_box_output', 'post', 'normal', 'high' );
add_meta_box( 'wpshed-meta-box', __( 'Film Bilgileri', 'wpshed' ), 'wpshed_meta_box_output', 'page', 'normal', 'high' );
}
add_action( 'add_meta_boxes', 'wpshed_add_custom_meta_box' );


/**
* Output the Meta box
*/
function wpshed_meta_box_output( $post ) {
// create a nonce field
wp_nonce_field( 'my_wpshed_meta_box_nonce', 'wpshed_meta_box_nonce' ); ?>












}

/**
* Save the Meta box values
*/
function wpshed_meta_box_save( $post_id ) {
// Stop the script when doing autosave
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return;

// Verify the nonce. If insn't there, stop the script
if( !isset( $_POST['wpshed_meta_box_nonce'] ) || !wp_verify_nonce( $_POST['wpshed_meta_box_nonce'], 'my_wpshed_meta_box_nonce' ) ) return;

// Stop the script if the user does not have edit permissions
if( !current_user_can( 'edit_post', get_the_id() ) ) return;

// Save the textfield
if( isset( $_POST['wpshed_textfield'] ) )
update_post_meta( $post_id, 'wpshed_textfield', esc_attr( $_POST['wpshed_textfield'] ) );

// Save the textarea
if( isset( $_POST['wpshed_textarea'] ) )
update_post_meta( $post_id, 'wpshed_textarea', esc_attr( $_POST['wpshed_textarea'] ) );
}


add_action( 'save_post', 'wpshed_meta_box_save' );
aktuelsoylesi Lokasyon123

kişi bu mesajı beğendi.

Lokasyon123 Lokasyon123 İNTERAKTİF YAZILIM 80 TL Kullanıcı
  • Üyelik 11.04.2016
  • Yaş/Cinsiyet 28 / E
  • Meslek Ogrenci
  • Konum Edirne
  • Ad Soyad B** A**
  • Mesajlar 2883
  • Beğeniler 363 / 319
  • Ticaret 2, (%100)
hocam bu kodları komple functions.php y mi yazacağız peki bunları nasıl kullanacağız yani eklemek istediğimiz yerlere falan daha yeni yeni öğreniyorum wordpreside bu tarzda kaynak bulamamıştım hiç
 

 

https://wmaraci.com/forum/script-alisverisi/interaktif-sozluk-benzeri-php-pdo-yazilim-simdi-indirimde-533214.html

TEHET TEHET Kullanıcı
  • Üyelik 04.10.2014
  • Yaş/Cinsiyet 31 / E
  • Meslek Tasarımcı
  • Konum Ankara
  • Ad Soyad M** A**
  • Mesajlar 791
  • Beğeniler 96 / 374
  • Ticaret 1, (%100)
Evet functions'a ekleyeceksin.

Nasıl kullanacağız sorusuna, örnek olarak;
$meta_text = get_post_meta($post->ID, 'wpshed_textarea', true);
echo 'Film Hakkında:'. $meta_text;
?>
 

 

wmaraci
Mersin evden eve nakliyat

52282 52282 WM Aracı Anonim Üyelik
  • Üyelik 26.07.2015
  • Yaş/Cinsiyet - /
  • Meslek
  • Konum
  • Ad Soyad ** **
  • Mesajlar 1296
  • Beğeniler 169 / 271
  • Ticaret 13, (%100)
TEHET Selam hocam. Bu dediklerinizi yapınca şuan ki kayıtlar silinir mi - sıfırlanır mı?
 

 

TEHET TEHET Kullanıcı
  • Üyelik 04.10.2014
  • Yaş/Cinsiyet 31 / E
  • Meslek Tasarımcı
  • Konum Ankara
  • Ad Soyad M** A**
  • Mesajlar 791
  • Beğeniler 96 / 374
  • Ticaret 1, (%100)
Yıldırım hiçbir fikrim yok o konuda. Localhostta denedikten sonra uygulamak mantıklı olacaktır.
 

 

Lokasyon123 Lokasyon123 İNTERAKTİF YAZILIM 80 TL Kullanıcı
  • Üyelik 11.04.2016
  • Yaş/Cinsiyet 28 / E
  • Meslek Ogrenci
  • Konum Edirne
  • Ad Soyad B** A**
  • Mesajlar 2883
  • Beğeniler 363 / 319
  • Ticaret 2, (%100)
hocam peki mesela link eklesek onu nasıl yapabiliriz mesela indirme linki gibi birşey
 

 

https://wmaraci.com/forum/script-alisverisi/interaktif-sozluk-benzeri-php-pdo-yazilim-simdi-indirimde-533214.html
wmaraci
Konuyu toplam 1 kişi okuyor. (0 kullanıcı ve 1 misafir)
Site Ayarları
  • Tema Seçeneği
  • Site Sesleri
  • Bildirimler
  • Özel Mesaj Al