Find Jobs
Hire Freelancers

Create a WordPress Template 1

$10 USD

ที่ทำเสร็จแล้ว
โพสต์ มากกว่า 7 ปีที่ผ่านมา

$10 USD

ชำระเงินเมื่อส่งงาน
Wordpress expert needed for this project. I wanted to search result from the post title and post content (from particular html tag like <strong> tag) I needed just line of code to add in [login to view URL] I'll award only if the code will work.
รหัสโปรเจกต์: 12114220

เกี่ยวกับโปรเจกต์

2 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 8 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี
หมอบหมายให้:
รูปอวาตาร์ของผู้ใช้
Add these 2 functions to your [login to view URL] function search_excerpt_highlight() { $excerpt = get_the_excerpt(); $keys = implode('|', explode(' ', get_search_query())); $excerpt = preg_replace('/(' . $keys .')/iu', '<strong class="search-highlight">\0</strong>', $excerpt); echo '<p>' . $excerpt . '</p>'; } function search_title_highlight() { $title = get_the_title(); $keys = implode('|', explode(' ', get_search_query())); $title = preg_replace('/(' . $keys .')/iu', '<strong class="search-highlight">\0</strong>', $title); echo $title; } Edit: To use the_content for your search results use the function below: function search_content_highlight() { $content = get_the_content(); $keys = implode('|', explode(' ', get_search_query())); $content = preg_replace('/(' . $keys .')/iu', '<strong class="search-highlight">\0</strong>', $content); echo '<p>' . $content . '</p>'; } In your loop or [login to view URL] file call <?php search_title_highlight(); ?> instead of <?php the_title(); ?> and use <?php search_excerpt_highlight(); ?>instead of <?php the_excerpt(); ?> In your css add the search-highlight class which will highlight all searched words in yellow. .search-highlight { background:#FFFF00 }
$15 USD ใน 1 วัน
5.0 (1 รีวิว)
0.4
0.4

เกี่ยวกับลูกค้า

ปักธงของ INDIA
Bokaro, India
5.0
30
ยืนยันวิธีการชำระเงินแล้ว
เป็นสมาชิกตั้งแต่ ม.ค. 6, 2013

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง