كيفية إضافة عنوان URL الصفحة في أسفل الصفحة نفس الصفحة؟
سؤال
بدأت دليل مقال في Word Press.أريد إضافة عنوان URL للمادة في نهاية الصفحة نفسها.
كيفية كتابة هذا الرمز.
على سبيل المثال http://ezinearticles.com/دراجة نارية الصوت --- Accessorize-with-a-helmet-with-speakers &؛ معرف= 6279817
هنا في النهاية يتم إعطاء عنوان URL.
شكرا لك.
المحلول
A few options for that:
The WordPress way would be to use get_permalink($post_id)
<?php
global $post
$link = get_permalink($post->ID);
or you could use the REQUEST_URI shown here: http://wordpress.org/support/topic/get-current-page-url
لا تنتمي إلى StackOverflow