Ronak Ganatra
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Remove comment form from postsHi @cgc87320 ,
Welcome to the WordPress community, and no worries—we’re here to help!
To disable comments on your posts, you can follow these steps:
To Disable Comments Globally on New Posts:
- Go to your WordPress dashboard.
- Navigate to Settings > Discussion.
- Uncheck the box that says Allow people to submit comments on new posts.
- Click Save Changes at the bottom of the page.
Alternatively, if you prefer, you can use a plugin like Disable Comments to disable comments globally across your site.
I hope this helps! Let me know if you have any questions or need further guidance.
Best regards,
Forum: Fixing WordPress
In reply to: Problem uploading a wp themeHello @julien2707 ,
The error message “Unable to create directory wp-content/uploads/2025/01. Is its parent directory writable by the server?” usually means that the server doesn’t have the correct permissions to write to theuploads
directory.Here are a few steps you can follow to resolve this issue:
- Check Permissions:
- Use an FTP client or your hosting control panel’s file manager to navigate to the
wp-content
directory. - Ensure that the
uploads
directory (and all subdirectories within it) have the correct permissions. Typically, the directory should have permissions set to755
or775
.
- Use an FTP client or your hosting control panel’s file manager to navigate to the
- Check Ownership:
- Ensure that the
uploads
directory is owned by the correct user. This is usually the same user that the web server runs as (e.g.,www-data
orapache
). You might need to contact your hosting provider if you’re unsure how to check or change this.
- Ensure that the
- Create the Directory Manually:
- You can try creating the missing directory manually using FTP or your hosting control panel. For example, create the
2025
folder insideuploads
, and then inside the2025
folder, create a01
folder.
- You can try creating the missing directory manually using FTP or your hosting control panel. For example, create the
- Check PHP Configuration:
- Ensure that your server’s PHP configuration allows writing to the
wp-content/uploads
directory. If you’re unsure, you might need to contact your hosting provider for assistance.
- Ensure that your server’s PHP configuration allows writing to the
- Review Error Logs:
- Check your server’s error logs for more specific details about what might be causing the issue. This can provide further insights if the above steps don’t resolve the problem.
Please try these steps, and let me know if you encounter any issues or need further assistance.
Best regards,
Ronak GanatraHello @milindmore22 ,
I understand your reply and I know it is about to redirect. The issue is due to the code added from AMP plugin is clear and I have verified with other plugins as there is not any other plugin conflicts.
Browser console doesn’t have any errors but it is conflict with Google Rich snippets and that too with Product schema ( For Article it is working ).
I have clearly explained in the video and also provided code snippets and the part of code which is conflicting, I hope your support team can help to fix it.
If this is due to browserr console error it should not show error on the rich snippet tool.
Video: https://www.loom.com/share/cfa9de8d2f724f8b8523f891fa0df56f?sid=26a8da85-eb63-4c5a-a853-8f6ae7c8058eNot Working Code on rich snippets:
<script type="text/javascript"> /* <![CDATA[ */ (()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),function({ampUrl:n,isCustomizePreview:t,isAmpDevMode:r,noampQueryVarName:o,noampQueryVarValue:s,disabledStorageKey:i,mobileUserAgents:a,regexRegex:c}){if("undefined"==typeof sessionStorage)return;const d=new RegExp(c);if(!a.some((e=>{const n=e.match(d);return!(!n||!new RegExp(n[1],n[2]).test(navigator.userAgent))||navigator.userAgent.includes(e)})))return;e.g.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("amp-mobile-version-switcher");if(!e)return;e.hidden=!1;const n=e.querySelector("a[href]");n&&n.addEventListener("click",(()=>{sessionStorage.removeItem(i)}))}));const g=r&&["paired-browsing-non-amp","paired-browsing-amp"].includes(window.name);if(sessionStorage.getItem(i)||t||g)return;const u=new URL(location.href),m=new URL(n);m.hash=u.hash,u.searchParams.has(o)&&s===u.searchParams.get(o)?sessionStorage.setItem(i,"1"):m.href!==u.href&&(window.stop(),location.replace(m.href))}({"ampUrl":"https:\/\/example.co?amp","noampQueryVarName":"noamp","noampQueryVarValue":"mobile","disabledStorageKey":"amp_mobile_redirect_disabled","mobileUserAgents":["Mobile","Android","Silk\/","Kindle","BlackBerry","Opera Mini","Opera Mobi"],"regexRegex":"^\\\/((?:.|\\n)+)\\\/([i]*)$","isCustomizePreview":false,"isAmpDevMode":true})})(); /* ]]> */ </script>` <script type="application/ld+json">{"@context":"https://schema.org/","@type":"Product","name":"The Nike Air Force 1 “Be The One” Inspires Athletes Ahead Of The 2024 Olympics","image":"https://example.com?w=780&h=550&crop=1","aggregateRating":{"@type":"AggregateRating","ratingValue":5,"reviewCount":10}}</script>
Working Code on Rich snippets:
<script type="text/javascript"> /* <![CDATA[ */ (()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),function({ampUrl:n,isCustomizePreview:t,isAmpDevMode:r,noampQueryVarName:o,noampQueryVarValue:s,disabledStorageKey:i,mobileUserAgents:a,regexRegex:c}){if("undefined"==typeof sessionStorage)return;const d=new RegExp(c);if(!a.some((e=>{const n=e.match(d);return!(!n||!new RegExp(n[1],n[2]).test(navigator.userAgent))||navigator.userAgent.includes(e)})))return;e.g.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("amp-mobile-version-switcher");if(!e)return;e.hidden=!1;const n=e.querySelector("a[href]");n&&n.addEventListener("click",(()=>{sessionStorage.removeItem(i)}))}));const g=r&&["paired-browsing-non-amp","paired-browsing-amp"].includes(window.name);if(sessionStorage.getItem(i)||t||g)return;const u=new URL(location.href),m=new URL(n);m.hash=u.hash,u.searchParams.has(o)&&s===u.searchParams.get(o)?sessionStorage.setItem(i,"1"):m.href!==u.href&&(window.stop(),location.replace(m.href))}({"ampUrl":"https:\/\/example.co?amp","noampQueryVarName":"noamp","noampQueryVarValue":"mobile","disabledStorageKey":"amp_mobile_redirect_disabled","regexRegex":"^\\\/((?:.|\\n)+)\\\/([i]*)$","isCustomizePreview":false,"isAmpDevMode":true})})(); /* ]]> */ </script> <script type="application/ld+json">{"@context":"https://schema.org/","@type":"Product","name":"The Nike Air Force 1 “Be The One” Inspires Athletes Ahead Of The 2024 Olympics","image":"https://example.com?w=780&h=550&crop=1","aggregateRating":{"@type":"AggregateRating","ratingValue":5,"reviewCount":10}}. </script>
Forum: Reviews
In reply to: [Shortcode Preview Block] Useful but not 100% accurateThank you @polywogg For using this plugin and providing your valuable feedback.
We will try to improve this Block.
The problem is due to WordPress Gutenberg’s some js which doesn’t support defer.
I had the same problem, I have added a WordPress hook to defer js. I have added a condition now that the hook will not call on admin pages and it fixed my issue.OLD code:
add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );
New code:
if ( !is_admin() ) {
add_filter( ‘clean_url’, ‘defer_parsing_of_js’, 11, 1 );
}after this code, it is not adding defer to admin side scripts and it saved me.
Forum: Plugins
In reply to: [Gutenberg] ES6 /ESNext Uncaught SyntaxError: Unexpected token <You have to run npm install && npm run build to build the esnext code.
Forum: Plugins
In reply to: [Contact Form 7] File upload is not compatible with Safari v11.1jQuery(function() {
jQuery(‘.class_name’).on(‘click’, function() {
jQuery(‘input[type=file]’).each(function() {
if (jQuery(this).val() === ”) {
jQuery(this).attr(‘disabled’, ”);
}
});
setTimeout(function(){
jQuery(‘input[type=file]’).each(function() {
jQuery(this).removeAttr(‘disabled’, ”);
});
}, 3000);
});
});Try this and let me know for temporary solution.
Forum: Fixing WordPress
In reply to: Create H1 in Page TitleGlad to hear that it works for you.
Forum: Fixing WordPress
In reply to: Double images in post header: ?WP or theme issue ?Welcome Buddy. Glad to see your problem is solved.
Forum: Fixing WordPress
In reply to: admin-ajax.php – Error 404Make sure you have used proper action from below hooks in function.php.
add_action( ‘wp_ajax_my_action’, ‘my_action’ );
add_action( ‘wp_ajax_nopriv_my_action’, ‘my_action’ );- This reply was modified 7 years, 2 months ago by Ronak Ganatra.
Forum: Fixing WordPress
In reply to: Double images in post header: ?WP or theme issue ?Go to on theme or child theme folder and open single.php file and find class=”featured-header-image” below this class you will find the_post_thumbnail or get_the_post_thumbnail function and remove it. It and check your page it will be removed from your header.
Forum: Fixing WordPress
In reply to: Woocommerce order notification via smsFor that you have to create custom code and set sms api provided by sms vendors
Forum: Fixing WordPress
In reply to: Create H1 in Page TitleGo to page.php file in your theme or child-theme folder and search for get_the_title() or the_title function and put <h1> before it and complete </h1> after function. and remove existing tag.
Forum: Fixing WordPress
In reply to: pop up aggrement to databaseYou have to create whole flow for it.
Forum: Fixing WordPress
In reply to: admin-ajax.php – Error 404Can you please write steps of code what you have did may be there is any issue of path. CMake sure you have used proper coding standards and right way.