now browsing by category


(WordPress) How to handle multiple instance of “send_to_editor” js function

WordPress built-in media uploader is a great library for uploading media. We can create a upload popup instance for upload media or select media from media library by following way:

After upload done we can get the media URL clicking on “Insert into..” button which actually calls “send_to_editor” function that receives media link as argument. So we can write following code to set image URL in a textbox.

It normally works when you have only one instance like bellow:


But what will happen for following scenario where we have two or more custom field area that needs to upload media and insert it into the texfield or container specified?

Read More

(WordPress) How to show links in excerpt?

the_excerpt() function displays the summary of the page/post content after applying several filters to it including links.

If you want to show links in excerpt call or if you want to apply your own filtering algorithm, at first need to remove the wp_trim_excerpt filter from get_the_excerpt.

Read More

(WordPress) How to open custom link in menu to new tab?

WordPress custom link in menu open the page in the same window by default.

Simple steps 🙂 to open the page in the new tab or to enable the target=”_blank” are…
Read More