Title: Why my code doesn&#8217;t work?
Last modified: December 22, 2023

---

# Why my code doesn’t work?

 *  Resolved [deezywonder](https://wordpress.org/support/users/deezywonder/)
 * (@deezywonder)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/why-my-code-doesnt-work/)
 * I’m trying to create a function to make bold e-mails in the content of job listings,
   but it seems not working.
 * I already tried on the post-type “post” and it works, but when I change to “job_listing”,
   it seems not working – why is that?
 *     ```wp-block-code
       function bold_emails_in_job_listings($content) {
       	var_dump(is_singular('job_listing')); 
           if (is_singular('job_listing')) {
               $content = preg_replace_callback('/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/', function($matches) {
                   return '<strong>' . $matches[0] . '</strong>';
               }, $content);
           }
   
           return $content;
       }
       add_filter('the_content', 'bold_emails_in_job_listings');
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwhy-my-code-doesnt-work%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Jay](https://wordpress.org/support/users/bluejay77/)
 * (@bluejay77)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/why-my-code-doesnt-work/#post-17304256)
 * Hi [@deezywonder](https://wordpress.org/support/users/deezywonder/),
 * We aren’t able to help with custom code requests like this, as it’s outside the
   [scope of our support](https://wpjobmanager.com/support-policy/).
 * If you need assistance, you may want to look into one of these services:
 * [https://partners.woo.com/English/marketplace/](https://partners.woo.com/English/marketplace/)
   
   [https://jobs.wordpress.net/](https://jobs.wordpress.net/)
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘Why my code doesn’t work?’ is closed to new replies.

 * ![](https://ps.w.org/wp-job-manager/assets/icon-256x256.gif?rev=2975257)
 * [WP Job Manager](https://wordpress.org/plugins/wp-job-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-job-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-job-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-job-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-job-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-job-manager/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jay](https://wordpress.org/support/users/bluejay77/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/why-my-code-doesnt-work/#post-17304256)
 * Status: resolved