فرهاد-سئو 905 ارسال شده در شهریور 93 گزارش بازنشر ارسال شده در شهریور 93 سلام این قطعه کد در یک قالب بعنوان بک لینک ثبت شده بود اما من متوجه نشدم که دقیقا چه کاربردی داره ممنون میشم توضیح بدین که چه عملی انجام میده function BackLink(){ $get_posts = new WP_Query; $ppages = array(); $pages = $get_posts->query('post_type=page&posts_per_page=-1'); foreach ($pages as $page) { $post_custom = get_post_custom($page->ID); if ($post_custom['_wp_page_template'][0] == 'template-portfolio.php') { $ppages[] = $page->ID; } } if (!empty($ppages)) { echo '<span class="all-l" title="' . __('View all projects', vernissage) . '"><a href="' . get_permalink($ppages[0]) . '"></a></span>'; }}function portfolioID(){ $get_posts = new WP_Query; $ppages = array(); $pages = $get_posts->query('post_type=page&posts_per_page=-1'); foreach ($pages as $page) { $post_custom = get_post_custom($page->ID); if ($post_custom['_wp_page_template'][0] == 'template-portfolio.php') { $ppages[] = $page->ID; } } if (!empty($ppages)) { return $ppages[0]; }}function galleryID(){ $get_posts = new WP_Query; $ppages = array(); $pages = $get_posts->query('post_type=page&posts_per_page=-1'); foreach ($pages as $page) { $post_custom = get_post_custom($page->ID); if ($post_custom['_wp_page_template'][0] == 'template-gallery.php') { $ppages[] = $page->ID; } } if (!empty($ppages)) { return $ppages[0]; }}function BlogLink (){ $posts_page_id = get_option( 'page_for_posts'); $site_url = home_url() ; echo '<div class="all-l" title="' . __('View all posts', vernissage) . '"><a href="'.$site_url.'/?page_id=' . $posts_page_id . '"></a></div>';} نقل قول لینک به ارسال
پست های پیشنهاد شده
به گفتگو بپیوندید
هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .