I am using customized version of _s theme where I have Product CPT. In the following files, I need to use Infinite scroll (provided by Jetpack) - archive-products.php taxonomy-[tax-name].php home.php archive.php Now, the problem is most of these templates use custom loop (using WP_Query which ends with pagination after while()). I have used following code in functions.php after activating jetpack and Photon module - function vg_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'container' => 'page-content', 'footer' => 'page', 'type' => 'click', 'render' …
I've got a WordPress install where I'm trying to change this content_width code: if( ! isset( $content_width ) ) $content_width = 290; in my functions.php file based on the users screen size. I've tried using CSS media queries, but for our particular use-case, I need to be able to change this in the functions.php file based on the users screen size. Ideally 1080 for Desktop, 720 for tables, and 290 for mobile. Any ideas?
In the image below, I set the page Welcome! as my homepage. There is no link to that page, and there is only one way to go to the homepage: click on the banner. However, there is two different items referring to the homepage in the stat. Do you know what are the differences between them?
How can I remove the Stats by Jetpack widget from dashboard, especially for non-admin users? This is the widget that shows how much spam has been blocked and I want to keep it active (blocking spam) but just remove the widget.
I am trying to get Jetpkack's infinite scroll to work with the WooCommerce product archive template. I have added the following code to my theme, after installing Jetpack, and I do see the sticky footer that shows when infinite scroll is enabled, and I see it loading default seven products instead of normal output, which leads me to assume the infinite scroll function is firing: function mytheme_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'render' => 'mytheme_infinite_scroll_render', 'footer' => 'wrapper', …
When try to install the latest JetPack plugin, I got below error: The plugin jetpack/jetpack.php has been deactivated due to an error: Plugin file does not exist. Tried many times to install but same result.
Hello guys I have a site which I installed JetPack in order to use Publicize to add the functionality to my CPT I added this code: 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ,'author', 'publicize' ), It was working perfect but a few days ago it stopped working I have used this article to troubleshoot but with not success https://jetpack.com/support/publicize/troubleshooting-publicize/ have you have this issue before? thank you for your help.
I would like to have my image descriptions added to every image caption on my site. No matter where the caption is shown, I would like to have the description prepended, if there is one to this image. Nothing easier than that, I thought, and filtered the wp_get_attachment_caption to make sure it happens. And it works for every image displayed anywhere. Post thumbnails, images in posts... Except for the images loaded in a jetpack slider. The modified caption, although Jetpack …
I am using jet pop up plugin to open a custom post type in a pop up. The idea is to track which post is more interesting for users so we need to show post view counts or track click events and show them to wordpress admin on the custom post type listing. I tried using different plugin to show post count but since post is opening in modal, no specific URL, no page load... plugins are not counting views …
I have a website which uses Jetpacks wp.me shortlinks. Sadly after the website URL change those are still pointing to the old address. Is is possible to force regenerate those?
I am cloning a friends WP installation using mysqldump, rsync and docker to fetch all files and data. When running the site, I get the following error: Fatal error: Uncaught Error: Class 'Jetpack_Options' not found in /var/www/html/wp-content/plugins/jetpack/class.jetpack.php:2154 Stack trace: #0 /var/www/html/wp-content/plugins/jetpack/class.jetpack.php(702): Jetpack::get_option('edit_links_caly...') #1 /var/www/html/wp-content/plugins/jetpack/class.jetpack.php(403): Jetpack-&gt;__construct() #2 /var/www/html/wp-content/plugins/jetpack/load-jetpack.php(89): Jetpack::init() #3 /var/www/html/wp-content/plugins/jetpack/jetpack.php(149): require_once('/var/www/html/w...') #4 /var/www/html/wp-settings.php(371): include_once('/var/www/html/w...') #5 /var/www/html/wp-config.php(90): require_once('/var/www/html/w...') #6 /var/www/html/wp-load.php(37): require_once('/var/www/html/w...') #7 /var/www/html/wp-blog-header.php(13): require_once('/var/www/html/w...') #8 /var/www/html/index.php(17): require('/var/www/html/w...') #9 {main} thrown in <b>/var/www/html/wp-content/plugins/jetpack/class.jetpack.php</b> on line 154 The class exists, it is not …
I added the following code to the functions.php file add_filter( 'avatar_defaults', 'new_gravatar' ); function new_gravatar ($avatar_defaults) { $myavatar = 'link'; $avatar_defaults[$myavatar] = "name"; return $avatar_defaults; I'm taking the profile picture from my own server. But there is a problem! "I1.wp.com" appears at the beginning of the url in the profile image. What is the reason? So it looks like: "https://i1.wp.com/mysite.com/images/myavatar.png" I've disabled all plugins. But the result was not successful. I'm dealing with it in days. How do we delete …
I manage a WordPress website using an virtual machine in the cloud, and lately, I noticed a lot of unwanted requests to the xmlrpc.php component that are slowing down the site causing high CPU loads. If it was for me, I would disable it entirely, but the site uses the JetPack plugin which relies on xmlrpc. So, my question is: how to allow JetPack access to xmlrpc while blocking everyone else and without disabling xmlrpc on the server? The site …
I've added [year] shortcode to some of my posts' titles. I used this in functions.php to enable this shortcode: add_shortcode( 'year' , 'current_year' ); function current_year() { $year = date("Y"); return "$year"; } I then added this too to enable shortcodes in widgets: add_filter( 'widget_text', 'do_shortcode' ); But the shortcode doesn't work in the post titles list shown by Top Posts & Pages widget by Jetpack. How do I fix it?
I need to remove the link to the Jetpack settings, but not the links to Omnisearch and Site Stats from the admin menu for everyone not having an administrator role: For this, I came up with this code: function remove_posts_menu() { if (!current_user_can('administrator')) { remove_submenu_page('admin.php?page=jetpack', 'admin.php?page=jetpack'); } } add_action('admin_init', 'remove_posts_menu'); (Reference for the remove_submenu_page() function) However, this doesn't work. I did check that the function is called and so by adding remove_submenu_page('tools.php', 'tools.php'); - when this is added to the …
I turned on Photon (Jetpack). Now, my photos are served from Wordpress's CDN. Is safe to delete the photos I uploaded (which are stored in wp-content/uploads/...) ?
I want to know how to setup the final code to add to my theme Function.php file to let jetpack publicize share as this : Post Title + Post link Using this guide here : https://lobby.vip.wordpress.com/wordpress-com-documentation/customizing-publicize-sharing-behavior/ I'm not familiar with filter/actions
I built a plugin that registers a Gutenberg block that prints a simple Mailchimp form. The plugin works with no issues. But, if I activate Jetpack and try to edit any page or post, I get a blank screen and multiple Uncaught TypeError: r is not a function console errors such as this one with little variations: editor.js?ver=9.1:6 Uncaught TypeError: r is not a function (https://domain.com/wp-content/plugins/jetpack/_inc/blocks/editor.js?ver=9.1) at editor.js?ver=9.1:6 at Array.forEach (<anonymous>) at e.exports (editor.js?ver=9.1:6) at f (editor.js?ver=9.1:6) at Module.<anonymous> (editor.js?ver=9.1:18) …
I want to disable some of the Jetpack modules such as Stats in order to check if they make the web site slower or not. But I couldn't see an option to disable modules one by one. Of course, one can disable the Jetpack plugin as a whole. Is there a way to disable Stats module only?
I currently trying to insert a block of custom code inside the WordPress posts loop which is using JetPack's infinite scroll functionality. In theory, this should be quite simple but is proving otherwise. this is what I have currently written: <?php $count = 0; while( have_posts() ) : the_post(); get_template_part( 'content-post', get_post_format() ); if ($count === 4) { get_template_part( 'block-one', get_post_format() ); } $count ++; endwhile; ?> So, if the count is at 4 insert the custom block. However, when …