Web Development & WordPress

wp_actionscheduler_logs Huge size issue and how to solve this

** If the code shared below don’t work, then you can clear the table as per the screenshot i shared below

The database table becomes huge, it may be using either any SEO or Cache plugins ( my guess) you can see the size in the screenshot below, you can clear it as per the screenshot

wp_actionscheduler_logs Huge size issue and how to solve this

also one.com provides this code which should clear the table within 7 days ( which was 30 days by default)

add_filter( 'action_scheduler_retention_period', 'onecom_action_scheduler_purge' );
/**
* Change Action Scheduler default purge to 1 week
*/
function onecom_action_scheduler_purge() {
return 604800;
}

you need to put this above code in function.php ( screenshot below)

wp_actionscheduler_logs Huge size issue and how to solve this function php
Web Development & WordPress

How to redirect Author Page URL to Different Page

Change Author Link or Redirect Author URL to different page

Sometimes you may need to change default author url to different page. Here I am sharing you the code which you can use without modifying the theme file.


function modify_author_posts_url( $author_posts_url, $author_id ) {
  // modify the URL here
  $author_posts_url = 'https://www.example.com/';
  return $author_posts_url;
}
add_filter( 'author_link', 'modify_author_posts_url', 10, 2 );

You can use Code Snippet plugins to use the code, here is the screenshot about how you can use the code.

Change Author Link or Redirect Author URL to different page  using Code Snippet
Web Development & WordPress

Free Yoga based WordPress Site: Modification of Header, footer, menu, sidebar, author, category and more.

If you are a Yoga instructor and trying to create your website, here is your solution. Here I have shown in a video (4minutes) how you can create your initial Yoga Teaching site for free and how u can set up the site. Also I have shared css codes to modify it

You can see Demo here.

Here is the OceanWP TheAme.

Continue reading “Free Yoga based WordPress Site: Modification of Header, footer, menu, sidebar, author, category and more.”
Web Development & WordPress

Simple Timezone carousel with next and previous button to show different times of countries, using jQuery, php and css: WordPress or php based sites

Here is a simple timezone carousel to show time of different countries in carousel format. You can use Next and Previous button to show Next 4 countries time. I have shared you the corresponding php, html and css code. If you face any issue, feel free to comments.


<div id="time-carousel" class="time-carousel">
  <?php 
    $timezone_identifiers = DateTimeZone::listIdentifiers(DateTimeZone::AMERICA | DateTimeZone::EUROPE);
    foreach($timezone_identifiers as $timezone) {
        $date = new DateTime('now', new DateTimeZone($timezone));
        echo '<div class="time-carousel-item">';
        echo '<h3>'.$timezone.'</h3>';
        echo '<p>' . $date->format('H:i') . '</p>';
        echo '</div>';
    }
  ?>
</div>
<a href="#" id="prev">Previous</a>
<a href="#" id="next">Next</a>

<script>
jQuery(document).ready(function(){
    var slideIndex = 0;
    showSlides();

    function showSlides() {
        var i;
        var slides = jQuery(".time-carousel-item");
        for (i = 0; i < slides.length; i++) {
            if(i < slideIndex || i >= slideIndex + 4) {
                slides.eq(i).hide();  
            } else {
                slides.eq(i).show();
            }
        }
    }

   jQuery("#prev").click(function(event){
    event.preventDefault();
    var slides = jQuery(".time-carousel-item");
    slideIndex = Math.max(0, slideIndex - 4);
    showSlides();
});

jQuery("#next").click(function(event){
    event.preventDefault();
    var slides = jQuery(".time-carousel-item");
    slideIndex = Math.min(slides.length - 4, slideIndex + 4);
    showSlides();
});
});
</script>
<style>
	.time-carousel {
  display: flex;
  flex-wrap: wrap;
}
.time-carousel {
    display: flex;
    flex-wrap: wrap;
}
.time-carousel-item {
    width: 25%;
    padding: 10px;
    text-align: center;
}
	.time-carousel-item h3 {
    font-size: 18px;
    font-weight: bold !IMPORTANT;
}
</style>	
Web Development & WordPress

In elementor font family is used var( –e-global-typography-primary-font-family ) how to change this font?

To change the font family in Elementor, you can do the following:

  1. Go to the Elementor editor for the page or template where you want to change the font family.
  2. Click on the hamburger menu icon in the top left corner to open the Global Settings.
  3. Go to the Typography tab.
  4. Under the Primary Font section, you will see the option to change the font family.
  5. You can either choose a font from the dropdown menu or enter the name of a custom font you want to use.
  6. Click on the Save button and the new font family will be applied to all elements on your page that use the primary font.