display none using javascript
Either we can use show() and hide() functions for this: $(“#hide_id”).hide(); $(“#hide_id”).show(); Or using css in scripts: $(“#hide_id”).css(“display”, “none”); this id can be displayed using: $(“#hide_id”).css(“display”, “block”);
How to call tag manager code in infinite scroll website pages?
Infinite scrolling pages, means at the end of a page next page will be loaded. This is latest trends in websites now. Especially in news website. Here we added instruction to track these infinite page scroll analytics using google analytics. Here we creating an event to get google analytics details while page scrolls: Event name…
How to create a custom event in google tag manager
Here we creating an event to get google analytics details while page scrolls: Event name :Scrollview Variables :pageurl, pagetitle dataLayer.push({ ‘event’:’Scrollview’, ‘pageurl’:titleurl, ‘pagetitle’:title }); This should be called wherever you need to trigger the event, in this case while page scrolling. Using this variable and event we need to configure an event in google tag…
Datalayer.push in google tag manager
dataLayer.push({ }); dataLayer.push javascript snippet is used to push details to Google tag manager. We can create a event and variables required for this/ dataLayer.push({ ‘event’:’Scrollview’, ‘pageurl’:titleurl, ‘pagetitle’:title }); Here we creating an event called “ScrollView” , pageurl and pagetitle are variables we need to push to tag manager. Using these variable and event we…
Google tag manager
Google tag manager is used to add tags used in the website. Eg: Analytics, Any other tracking code, etc.. We can provide all those data in a single console provided by the tag manager. https://tagmanager.google.com/ Here we need to create an account with our website details. This is what is called “Work space” in tag…
How to remove extra line break from editor using search and repalce method
You need to set search mode as regular expression: Search for : [\r\n]{2,} replace with :\n
Restricting wordpress search only for specific post type
function search_filter($query) { if ($query->is_search) { $query->set(‘post_type’, ‘post’); // specify slug of post type instead of this ‘post’ } return $query; } add_filter(‘pre_get_posts’,’search_filter’);
Our own plugins
Plugin to upload image in widgets: Download plugin from below link: widget-media-upload WordPress plugin to list woocommerce taxonomies with images. First of all set image uploading plugin to categories. We have used plugin: “Category images”: https://wordpress.org/plugins/categories-images/ Then we can choose the categories from the widget and show anywhere in the website with sidebars. Plugin :…
The plugin generated ” characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.
Please remove the closing tag of php from the end of your plugin files