Suppose you want your visitor not to see any specific pages and want them to redirect to login or register page, then you can do this using this following code. Here i used the body class of wordpress page. Using the Body class and using php and jquery you can redirect it .
WordPress 5.6 comes with a brand new default theme: Twenty Twenty-One. Here I am sharing you some basic css or style modifications using which you can give it a look of your own. I have added the child theme below which you can download and use without any issue.
Sometimes you may want to show the previous and next post title from same category just below your post. Here I am sharing you the code which i got from internet and used for someone which worked great. Here I am sharing you the corresponding css and php code.
CSS Code ( This code may need to tweak based on your theme)
Tabbed menu without bootstrap ( using css, jquery and html)
In most of the cases we uses bootstrap, which is easy to use. But sometimes we may need to create tabbed menu without bootstrap. Here I am sharing you the related html, css and jQuery code using which you can use Tabbed menu without using bootstrap (screenshot above). You can use this in WordPress, Shopify or any other platform where you can use html,css and jQuery.
You can contact me at om2000_cuet in my skype or can ask question in comments section.
Seedlet by Automattic is a free WordPress theme which is designed to focus on typography allowing your writing and content to shine. If you want to use this theme, i have shared some css which you can use to change the design, like font, color, size etc of the theme.
If you are a Creative Photographer then wordpress theme Monet is for you. Monet is a delicate responsive grid-layout theme targeted at photographers and other creatives. Here I am sharing you some css tricks using which you can modify the header color, fonts, font family and more. If you have any Question feel free to ask in comment section.
To change font size, color and font family of Header title in homepage
If you want to create a FAQ (Frequently Asked Question) page and want to show the Question & Answers in Accordion ( click and open), then you can use this code. Though there are plugins for that, but here I am sharing you the basic FAQ accordion html css and JQuery code so that you can use it without the use of plugins. Feel Free to message me in Skype if you need help.
This code i used for one of my client and it works. Based on client’s requirement I redirect his site to different pages based on country ( Denmark, Netherlands, Poland, France and Germany. Here is the code:
<?php
$ip = $_SERVER['REMOTE_ADDR']; // This will contain the ip of the request
// You can use a more sophisticated method to retrieve the content of a webpage with php using a library or something
// We will retrieve quickly with the file_get_contents
$dataArray = json_decode(file_get_contents("http://www.geoplugin.net/json.gp?ip=".$ip));
//var_dump($dataArray);
// outputs something like (obviously with the data of your IP) :
// geoplugin_countryCode => "DE",
// geoplugin_countryName => "Germany"
// geoplugin_continentCode => "EU"
//echo "Hello visitor from: ".$dataArray->geoplugin_countryCode;
if($dataArray->geoplugin_countryCode=='DE'){
echo("<script>location.href = 'http://yoursiteurl.com/DE/';</script>");
}
else if($dataArray->geoplugin_countryCode=='NL'){
echo("<script>location.href = 'http://yoursiteurl.com/NL/';</script>");
}
else if($dataArray->geoplugin_countryCode=='FR'){
echo("<script>location.href = 'http://yoursiteurl.com/FR/';</script>");
}
else if($dataArray->geoplugin_countryCode=='PL'){
echo("<script>location.href = 'http://yoursiteurl.com/PL/';</script>");
}
else if($dataArray->geoplugin_countryCode=='IT'){
echo("<script>location.href = 'http://yoursiteurl.com/IT/';</script>");
}
else if($dataArray->geoplugin_countryCode=='DK'){
echo("<script>location.href = 'http://yoursiteurl.com/DK/';</script>");
}
else if($dataArray->geoplugin_countryCode=='ES'){
echo("<script>location.href = 'http://yoursiteurl.com/ES/';</script>");
}
else if($dataArray->geoplugin_countryCode=='PL'){
echo("<script>location.href = 'http://yoursiteurl.com/PL/';</script>");
}
?>