Nirr
Forum Replies Created
-
Hi! Can I use this function?
function add_growme_ads_scripts() {
if ( ! is_user_logged_in() ) {
// Grow Installation Script
echo '<script data-no-defer="1" data-grow-initializer="">!(function(){window.growMe||((window.growMe=function(e){window.growMe._.push(e);}),(window.growMe._=[]));var e=document.createElement("script");(e.type="text/javascript"),(e.src="https://faves.grow.me/main.js"),(e.defer=!0),e.setAttribute("data-grow-faves-site-id","tYjBkMi0U2l0ZTo22MmFkYzkwODUxNGQMGU0M2ExOC04YjVkLTRjMzQ=");var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t);})();</script>';
// Journey Ads Script
echo '<script type="text/javascript" data-no-defer="1" async="async" data-cfasync="false" src="https://scripts.scriptwrapper.com/tags/8b543a18-8543-44c3-d2b0-62a14ddc9085.js"></script>';
}
}
add_action( 'wp_footer', 'add_growme_ads_scripts' );Thanks!
Thanks for the reply, Dmitry!
I tried that snippit, and unfortunately it didn’t work for me.
However, I created the below snippet with the help of ChatGPT and it did work!
add_filter( 'slim_seo_breadcrumbs_links', function( $links ) {
if ( is_singular() ) { // For singular posts, pages, or custom post types
foreach ( $links as $index => $link ) {
if ( strpos( $link['url'], '/category/' ) !== false ) {
unset( $links[$index] );
}
}
$links = array_values( $links ); // Reindex the array
}
return $links;
});Or this?
add_filter( 'slim_seo_breadcrumbs_links', function( $links ) {
// Filter the links to remove any that contain '/category/'
$links = array_filter( $links, function( $link ) {
return strpos( $link['url'], '/category/' ) === false;
});
// Reindex the array after filtering
$links = array_values( $links );
return $links;
});I think 2nd code is more concise and efficient.
Which do you recommend @anh Tran? Can we use them safely?
This format is way batter, I guess: Jan 2024, Dec 2024, Feb 2024
So, I created this:-
add_shortcode( 'month_year', fn() => date( 'M Y' ) );
and added it as a snippet.Now, I can use this on meta titles
[month_year]
If possible, Add this format to “Others” section of the plugin.
Thanks in advanced!
I see that you’ve added this {{ current.month }} variable, but not in the way I thought.
Well, each month, it should show the current month’s name like January, February, March, etc.
But, {{ current.month }} will add the month in the number format (1,2,3) – this is not what I mean.
It should show the month in naming style and the numbering style is not helpful.
- This reply was modified 1 month, 4 weeks ago by Nirr.
Forum: Plugins
In reply to: [Slim SEO - Fast & Automated WordPress SEO Plugin] SEO Title IssueHello, Tran!
I’m not using any other SEO plugin, and I don’t think my theme has any built in SEO functionality to prevent it.
I’ll create a staging site and test the issue later. For now, I’ll use that snippet.
Thanks for the support!
Thanks so much for your reply, Tran!
I completely understand, my friend!
After using your plugin on our site for some time and testing, we’ll go with the Pro version.
Please try to include “Post Type Switcher” option in the Pro version as well.Have a great day!
Thanks!
I would appreciate it if you could include this feature in the free version.Forum: Plugins
In reply to: [WC External Variations] Plugin Suggestions (“ADD TO CART” button)Regarding #1
There is a better way to filter this. Check how this is done by AMB Variable Affiliate
They use a “tick box” that we need to check when we use an external (affiliate) product.
Check my previous screenshot from here.(I’m using their plugin currently, looks like they have abandoned this. I’ll keep looking for migrating to a new plugin)