cari the_content(); lalu rubah jadi seperti ini:
<?php
if ($user_ID):
the_content();
else:
the_excerpt();
endif;
?>
Sedangkan untuk membuka pendaftaran, tinggal aktifkan aja menu pendaftaran di Settings – General
ikutan menyimak dan belajar bersama gan…. rencana mau buat blog khusus member juga… 🙂
lokasi di folder theme yg digunakan
nama filenya:
– page.php
– single.php
bisa juga nyoba yg ini:
<?php
if ( is_user_logged_in() ): the_content();
else: the_excerpt();
endif;
?>
kalau di frontend theme bagusan ini, seperti timdesain tulis
<?php
if ( is_user_logged_in() ): the_content();
else: the_excerpt();
endif;
?>
Tetapi bila di backend, pd hook-hook awal, sy biasa bikin fungsi
<?php
global $current_user;
$user_ID = $current_user->id;
if ($user_ID):
echo get_the_content();
else:
echo get_the_excerpt();
endif;
?>
personal taste aja sih
Menarik, info yang bermanfaat!