you can write the script with a conditions
<?php is_front_page(){ ?>
<script>
jQuery(window).ready(function($){
$("#sidebarRight").animate({right: '0px'});
});
</script>
<?php } ?>
alternatively you can set the cookie or localstorage that the animation has been completed
<script>
if(!localStorage.getItem("animated")){ // check if the animated is set if not set do the animation
jQuery(window).ready(function($){
jQuery("#sidebarRight").animate({right: '0px'});
localStorage.setItem("animated", "yes"); // after comleting the animation set the animated so that animation does not happen again
});
}
</script>
Related Posts:
- How to move page templates to custom folder?
- Is it possible to manipulate the list of page templates?
- Returning Variables back into a template
- Can not Remove Archives and Meta from Sidebar
- Toggle Sidebar Display
- Where can I access my custom page template?
- Disable front-page.php template
- Single Page theme [closed]
- Move default page templates to sub directory
- Need help with adding templates (archives and sitemap) to WordPress child theme
- Templates dropdown not appearing using _s theme (underscores)
- Load different single.php templates according to post layout selection
- Template for front page (latest posts)
- How to show children pages as array
- Create a variable with string, array or multiple values
- What is the point of using the front-page.php template? [closed]
- What’s the difference between home.php and index.php?
- Custom single template for a specific category
- How to insert a logo in the header?
- How to move page template files like page-{slug}.php to a sub-directory?
- Is it possible to stop selected plugins from loading on certain template pages?
- How to edit contents of dynamic_sidebar()?
- Page template in two level deep folder
- Create “File-less” Page Template in Functions.php
- HowTo: Add Class to Sidebar Widget List-Items
- How to wrap the widget content with a div or get the widget title outside?
- Different wordpress 404 template for different post type [duplicate]
- Adding items to page template dropdown on Page Edit Screen
- How does WordPress decide what template to use as frontpage
- How can I get wp_head() as a string instead of echoing it?
- Why does my short code get executed before other content?
- Retrieve the template directory URI via global or get_template_directory_uri() every time?
- Adding Content Areas to Custom Page Template
- How can I see what template parts are being called for rendering the viewable page?
- Add class to before_widget for all widgets with a dropdown and a counter
- Add a preview to a WordPress Control Panel
- How to get the name and description of a sidebar in theme?
- Add a #hash to the links in my custom menu
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- Problems with Layout inherit in theme.json
- Trouble with conditional tags
- How to Handle CSS for Multiple Header header.php Files?
- How to load different CSS in different Header?
- Static Front Page problem
- How the WordPress sidebar works
- Pagination & get_pages?
- Page attribute template dropdown not displayed even the syntax is correct
- How to override BuddyPress 3.0 bp-nouveau theme files?
- How to allow admins to create a sidebar from the admin
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- Setting hero/splash section as a blog post
- Where is the correct place(s) in twentysixteen’s header.php to add a Google webfont?
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Do I really need the div class entry?
- Best practices: Custom theme sidebar menu – hardcode or widget?
- Any tag pagination page (except the 1st page) loads index.php template instead of tag.php
- Switching between custom templates in a post type of the admin menu
- How do I update WooCommerce template files in my theme? [closed]
- Page template across themes
- how can I remove the sidebar from my wp homepage [closed]
- New template, where to place CSS?
- Check if password protected post is visible
- get_query_var() and permalinks
- What is the best way to handle multiple calls to get_template_directory_uri() and similar functions?
- Add theme templates for child categories into the template hierarchy
- Move theme templates to subfolder without losing page associations
- Theme development question regarding layouts
- Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme’s index.php?
- Display a specific dynamic sidebar widgets on a specific page
- searchform.php override not working
- WordPress page templates in a directory
- WordPress Theme Development: How to redirect templates the right way?
- How do I create a custom partial / template?
- Can I show all the template files that are being used on my site?
- Change the template of multiple multisite pages at the same time
- Implement content-nosidebar.php / content-leftsidebar.php
- get_page_template returning nothing
- Load child template based on parent
- Multiple Page Templates & CSS
- How to enable template page only for a post id page
- create-guten-block in wordpress theme?
- Highest number of WordPress Custom Page Templates?
- Override template file i subfolders
- Can Page Templates be Applied to Archive and Post Templates?
- Custom metabox for custom page template
- Why is the Page Template dropdown menu using the wrong file name?
- How to add “Template” option in page attributes panel?
- Single page site with history.js
- Do i need to keep all the default WP templates files in a theme?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- how to display search term in the template full site editor
- How to create a custom page(not a template) in a theme
- Sort wp_query by sum of two meta fields
- How to override p2 breathe theme plugin in content template file?
- Template selection area is not visible on page editor sidebar in wordpress twentty sixteen default theme
- Custom page template with custom fields
- What can I use for small text when converting to WordPress?
- how to setup custom content structures
- Displaying details of a post in a sidebar
- “Theme without sidebar.php is deprecated”