In this section we can see how we can disable and enable scrolling option in an ecommerce website using javascript function. First of all we have to set up a block of code in the respective page. // PREVENT DEFAULT HANDLERfunction preventDefault(e) { e = e || window.event; if (e.preventDefault) { e.preventDefault(); } e.returnValue =… Continue reading How to disable and enable the scroll in website(Java Script)
Category: Wordpress
How to add a menu to wordpress dashboard
The add_menu_page function in WordPress is used to add a top-level menu page in the WordPress dashboard. Here’s the basic syntax of the add_menu_page function: add_menu_page( string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = ”, string $icon_url = ”, int $position = null ) Parameters in the function are: $page_title (string): The… Continue reading How to add a menu to wordpress dashboard
How to fetch the Category id in WordPress
We can add categories in the insights menu option in wordpress. These categories are able to view in Insights > Insights Category option in the dashboard of a wordpress page. These categories can be used as contents in the themes as well. So lets see how can we get the Id of these fields and… Continue reading How to fetch the Category id in WordPress
Adding image field in ACF plugin
To add an image field using the Advanced Custom Fields (ACF) plugin in WordPress, you can follow these steps: Make sure the ACF plugin is installed and activated on your WordPress site. In your WordPress admin dashboard, go to “Custom Fields” and click on “Add New” to create a new field group. Enter a title… Continue reading Adding image field in ACF plugin
Upsells and cross sells in WooCommerce Store.
WooCommerce cross-sells and upsells are both marketing strategies to get customers to increase their average order value by offering relevant product recommendations on the product page, in the cart, or at the checkout. These two terms are often used interchangeably but actually refer to two distinctly different marketing techniques. Upsell means you “offer the same type of product… Continue reading Upsells and cross sells in WooCommerce Store.
Plugin to display twitter feed
To display twitter feeds in wordpress,a new plugin “Feed Them Social – Page, Post, Video and Photo Galleries” by By SlickRemix can be used. “ Custom Twitter Feeds” plugin was used to display twitter feed in wordpress.Now this plugin updates feeds in the page only for paid users.A update may happen in June which enable… Continue reading Plugin to display twitter feed
How to add footer links in wordpress
Create a widget in your custom theme. To add widgets in the dashboard, register sidebar function in the page functions.php. function arphabet_widgets_init(){register_sidebar( array(‘name’ => ‘Footer Sidebar 1’,‘id’ => ‘footer-sidebar-1’,‘description’ => ‘Appears in the footer area’,‘before_widget’ => ”, ‘after_widget’ => ”,‘before_title’ => ‘ ‘, ‘after_title’ => ”,) );…….…..…}add_action(‘widgets_init’,’arphabet_widgets_init’); This will give a widget in the dashboard.… Continue reading How to add footer links in wordpress
To fetch the post count based on all user roles in WordPress
get_editable_roles() function to retrieve an array of all user roles and their details. We then iterate through each role and perform a user query for that specific role. Inside the loop, we display the role name as a heading.
How to fetch the post count based on usernames for all users in WordPress
Code attaching below: Here, the post counts that are fetching for the user who has the role ‘Subscriber’.
Custom menu creation in wordpress
To register a navigation menu in WordPress the function : register_nav_menus() should be added in functions.php file. This will create a menu tab in wordpress control panel. To customize the default menu, you have to enter the WordPress dashboard, click on Appearance and then on Menus. Give the menu a name, and then click the Create Menu button. After creating it,… Continue reading Custom menu creation in wordpress