saeed.spore 1 ارسال شده در اردیبهشت 94 گزارش بازنشر ارسال شده در اردیبهشت 94 سلام دوستان میخوام یک پیوند یکتا بری پست تایپ ایجاد کنمکه از متا کد استفاده کنهیک چیزی اینطوری اوکی کردم ولی نمیدونم چرا کار نمیکنهfunction my_post_type_link_filter_function3($post_link, $id = 0, $leavename = FALSE) { if (strpos('%author3%', $post_link) === FALSE) { $artist_id=get_post_meta(get_the_ID(), '_wbd_album_details_artistid',true);$artist_id2 = get_post_field( 'post_name', $artist_id); return str_replace('%author3%', $artist_id2, $post_link); }}add_filter('post_type_link', 'my_post_type_link_filter_function3', 2, 10);function my_post_type_link_filter_function2($post_link, $id = 0, $leavename = FALSE) { if (strpos('%author2%', $post_link) === FALSE) { $artist_id=get_post_meta(get_the_ID(), '_wbd_video_details_artistid',true);$artist_id2 = get_post_field( 'post_name', $artist_id); return str_replace('%author2%', $artist_id2, $post_link); }}add_filter('post_type_link', 'my_post_type_link_filter_function2', 2, 10);function my_post_type_link_filter_function($post_link, $id = 0, $leavename = FALSE) { if (strpos('%author%', $post_link) === FALSE) { $artist_id=get_post_meta(get_the_ID(), '_wbd_song_details_artistid',true);$artist_id2 = get_post_field( 'post_name', $artist_id); return str_replace('%author%', $artist_id2, $post_link); }}add_filter('post_type_link', 'my_post_type_link_filter_function', 2, 10);لطفا کمک کنید خیلی مهم نقل قول لینک به ارسال
Morteza 34190 ارسال شده در خرداد 94 گزارش بازنشر ارسال شده در خرداد 94 میخواید پیوند یکتا ایجاد کنید؟باید با تابع rewrite وردپرس کار کنید.استانداردش اون هست. نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .