You can get the tag name without permalink to it by using below code which is simple.. It is a simple foreach loop that returns the name of the specific category
How to get the category name without link
Today I am going to discuss about a simple but handy technique that might save your time. I was thinking to get rid of the permalink from the category name in WordPress. I got the way finally.. You can do it by using below code .
This code will return only the category name which is related to that specific post without the permalink to that category. You may need it sometimes when you don’t want to link the category to it’s archive page.
Advanced Custom Field Post object Field Inside Repeater
Today I am going to show you how you can show a post object inside two nested repeater field. Please check the below code .
Advnaced Custom Field Nested Repeater
Today I am going to show you the way how you can use a ACF repeater inside a repeater. I am using a parrent repeater named “product_page” and using a sub repeater inside this parent repeater named “post_repeater” . Now if you see the below code then you will see that how I have used the two repeater to out the exact result
Advanced Custom Field Post Object
Today I am going to share about advanced custom field post object field which is really handy. However it takes some effort to show the post object in front end. Below is that way you can show your post object data in front end
Working With Advanced Custom Field Repeater
Hi Guys.. Today I am going to show you that how you can use Advanced Custom Field repeater field. I am showing you here a code example so that you know how to use the repeater field . Here is a normal loop that you can use to show a repeater
Here is another simple example for repeater field
Here is a advanced loop that you can use to create a slider using Advanced Custom Field
How to add post author bio in WordPress post
In this tutorial I am going to so you that how you can add a post author bio in the single post view without using any plugin… This is simple and you can just do this by adding the below code to your theme function.php file
And then you can customize it using below css
Redirect domain using .htaccess
Here I am describing various types of .htaccess redirect.. you can select right one according to your need..
301 (Permanent) Redirect: Point an entire site to a different URL on a permanent basis. This is the most common type of redirect and is useful in most situations. In this example, we are redirecting to the “tothisdomain.com” domain:
# This allows you to redirect your entire website to any other domain
Redirect 301 / http://tothisdomain.com/
302 (Temporary) Redirect: Point an entire site to a different temporary URL. This is useful for SEO purposes when you have a temporary landing page and plan to switch back to your main landing page at a later date:
# This allows you to redirect your entire website to any other domain
Redirect 302 / http://tothisdomain.com/
Redirect index.html to a specific subfolder:
# This allows you to redirect index.html to a specific subfolder
Redirect /index.html http://example.com/newdirectory/
Redirect an old file to a new file path:
# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://example.com/newdirectory/newfile.html
Redirect to a specific index page:
# Provide Specific Index Page (Set the default handler)
DirectoryIndex index.html
Using Post Object Field in Advanced Custom Field Plugin
Using Post Object Field in Advanced Custom Field Plugin
In this post I am going to show the use of Post object field in Advanced Custom Field Plugin.. Just create a custom field type Post Object..
To output the result paste the below code in your theme location where you want to show it..
Force user to login or register in WordPress
Force user to login or register in WordPress
Few days ago I was searching for a solution that how can I force user to login or register in a site after 5 minutes when they visit the site for the first time. Actually it was my clients requirement and to do so I was searching for many solution. But couldn’t get a real solution. I had seen a plugin that offers something like that but it has also some problem. So I tried to build it of my own. When you do like below you will be able to Force User login or register in WordPress. Just added below code in footer.php or header.php in your theme file.
After this you need to also add the below css code to your theme file or you can add it as an external css file in your theme header or footer.
Also you have to install this plugin https://wordpress.org/plugins/nice-login-register-widget/ and add this plugin widget in the widget section so that the login form shows in the popup.
The popup will look like the below
That’s it and you are done. In this way you can Force user to login or register in WordPress