This article is for you if you’re trying to figure out how to render a Google map in your WordPress website, with multiple markers where the coordinates are coming from the posts or custom post types. Scenario: Let’s say you’ve created a custom post type called “Restaurants”. You have custom fields in that post where…
Category: Computer Science
How to Display the First Full Paragraph of a Post as the Excerpt in WordPress
WordPress has a build-in PHP function called “the_excerpt()” which calls the excerpt under your post’s settings (seen at the right side of a post’s editor). If that Excerpt field is empty, WordPress will call a trimmed down content of whatever is in the beginning of your editor. It might not be appealing especially if it’s…
Display 3 or more Posts per Row using WordPress Loop
There might be an occasion where you’d like to have your WordPress posts be displayed in columns within a Bootstrap “row” like the image below. You can do it whether it is in columns of two, three, or more. Simply copy the sample PHP code below to generate the same column and row layout in…
How to Block Countries in WHM
You can block visitors from certain countries from accessing your website. Blocking countries in WHM is easier than blocking countries in your .htaccess file. Instead of creating scripts or codes, all you need to do is select the country that you’d like to blacklist. Here’s how you can do it: Go to Security Center >…
Steps how to create domain in DirectAdmin
To create a new domain in DirectAdmin, login first to your account. Next, switch to User Level then click “Domain Administration” click “Add Another Domain” Enter your desired domain name in the “Domain” field and click the “Create” button. Preferably use the exact domain name you have in mind or have already purchased from a…