Previously I have posted how to use the_post_navigation() in the custom template. In this post I will tell you how you can use Display Recent Post outside WordPress so let’s get started.

First, you have to understand the code will only work with PHP file so whatever file name you choose make sure it ends with .php, for instance, I will use recent.php you can also use some CSS to show some pretty stuff in this example I will only concentrate on the PHP code and you can use your own CSS but for you I am writing some CSS classes so you can take advantage of it.

Copy/Paste the code below and use it in your project.

Make sure to change line # 4 as per your WordPress installation directory

If you like this article please share it with your friends and your comments are always welcome.

Have you heard about the responsive map on any website? here you can see the short trick Recently, I have been working on  client’s website where I had to use a custom template with their blog page so I thought to share it with you a simple trick so that you can use it in your project, let’s talk about how to usethe_post_navigation() in a custom template, the answer is pretty easy to understand, let’s get started.

You may have seen the code below in WordPress in most recent template twentyseventeen/single.php

All you have to add 2 more args to get the post from the same category it works dynamically no matter either you have to use with blog or any other category or custom taxonomy

So the final code will look like as example below.

Note:
Make sure you add your own class name for div and href.

If you have any other question related to the_post_navigation() comments below and I will make sure your question will be answered quickly. You can also download my S3Framework for WordPress for free.

It has been so long since I have written an article about How to Add WooCommerce Cart Icon With Cart Count To Your Theme and I have received many emails to write few more articles for the same subject but due to shortage of time I could not make it but the one question I have asked too frequently is creating responsive google map so the wait is over and let’s get started how to create Responsive Google Map on any website and any platform likewise WordPress, Joomla and any other HTML website.

In this tutorial, I will be showing you HTML and CSS and little instructions on how to get iframe from Google Map.

1# Get the Google Code Embade Code

  • Go to Google Maps.
  • Find the map area you want to use on your website.
  • Click on the “Share” link.

  • Choose “Embed map”.
  • Select the iframe code.
  • Right click and copy the embed code.

#2. Use the Embed Code

Paste the embed code in your website. It will look similar to this:

#3.Modify the Embed Code

Add a div tag around the embed code. Use the CSS class responsive-map so that your code now looks like this:

#4. Add the CSS

Now add some CSS properties inside one of your stylesheet files:

Your maps now will be responsive. Try resizing your browser to see it in action.

See the Pen Responsive Google Map with CSS by Shaz3e (@Shaz3e) on CodePen.

%d bloggers like this: