Nazrinn
Forum Replies Created
-
No luck.
Here is my full code for the admin panel of that CPT.
SEO column code is the last block.#Adds column add_filter ( 'manage_listings_posts_columns', 'add_acf_columns' ); function add_acf_columns ( $columns ) { return array_merge ( $columns, array ( 'status' => __ ( 'Status' ) ) ); } #reorder columns add_filter('manage_posts_columns', 'column_order'); function column_order($columns) { $n_columns = array(); $move = 'status'; // what to move $before = 'date'; // move before this foreach($columns as $key => $value) { if ($key==$before){ $n_columns[$move] = $move; } $n_columns[$key] = $value; } return $n_columns; } #Adds value to column function listings_custom_column ( $column, $post_id ) { switch ( $column ) { case 'status': echo ucwords(get_post_meta( $post_id, 'status', true )); break; } } add_action ( 'manage_listings_posts_custom_column', 'listings_custom_column', 10, 2 ); #Make column sortable function register_sortable_column( $columns ) { $columns['status'] = 'status'; return $columns; } add_filter('manage_edit-listings_sortable_columns', 'register_sortable_column' ); #Adds dropdown select add_action( 'restrict_manage_posts', 'listings_admin_posts_filter_restrict_manage_posts' ); function listings_admin_posts_filter_restrict_manage_posts(){ $type = 'post'; if (isset($_GET['post_type'])) { $type = $_GET['post_type']; } if ('listings' == $type){ $values = array( 'Coming Soon' => 'coming soon', 'Listed' => 'listed', 'Conditionally Sold' => 'conditionally sold', 'Sold' => 'sold', ); ?> <select name="ADMIN_FILTER_FIELD_VALUE"> <option value=""><?php _e('All Status ', 'wose45436'); ?></option> <?php $current_v = isset($_GET['ADMIN_FILTER_FIELD_VALUE'])? $_GET['ADMIN_FILTER_FIELD_VALUE']:''; foreach ($values as $label => $value) { printf ( '<option value="%s"%s>%s</option>', $value, $value == $current_v? ' selected="selected"':'', $label ); } ?> </select> <?php } } add_filter( 'parse_query', 'listings_posts_filter' ); function listings_posts_filter( $query ){ global $pagenow; $type = 'post'; if (isset($_GET['post_type'])) { $type = $_GET['post_type']; } if ( 'listings' == $type && is_admin() && $pagenow=='edit.php' && isset($_GET['ADMIN_FILTER_FIELD_VALUE']) && $_GET['ADMIN_FILTER_FIELD_VALUE'] != '') { $query->query_vars['meta_key'] = 'status'; $query->query_vars['meta_value'] = $_GET['ADMIN_FILTER_FIELD_VALUE']; } } //TEST remove SEO column. add_filter( 'manage_listings_posts_columns', 'remove_seo_column', 99 ); //priority function remove_seo_column( $columns ) { var_dump( "GIVE ME MY COLUMNS AAAAA", $columns ); //unset( //$columns['SEO'], //); return $columns; }
I tried to do a
var_dump()
in the firstmanage_listings_posts_columns
but this one also returns me nothing (visible).- This reply was modified 3 years, 7 months ago by Nazrinn.
I used var_dump before but somehow it didn’t display anything (I know for sure WP_DEBUG is true). Even with inspecting, I couldn’t find the my
var_dump()
.Any idea of what might cause this?
The function itself seem to work as if I return anything that is not$columns
the admin panel for this post type becomes blank.- This reply was modified 3 years, 7 months ago by Nazrinn.
Let me know!
**I HAVE REPRODUCED THE BUG.**
I stumbled upon it again while doing testing for another thing.I have seen it happen in the Elementor editor while editing a page template. I have double-checked. I have both Elementor free + Elementor Pro activated and installed (before I had SVG Support activated).
Also note that this is a WordPress Notice, not an actual “error” in the proper sense of the term.
Thanks @abdullahramzan! I’ll wait for your response.
It worked and only took a minute! Thank you!
The graph now work. Everything is good it seems.
By curiosity, do all stats refresh only once daily?
Technically GA is showing last 7 days, and the Site Kit dashboard is showing the last 28 days in my screenshots.
How I set up things:
- Analytics account is connected to oldsite.com
- 301 redirect from oldsite.com to newsite.ca
- Connect Site Kit to newsite.ca, using the same GA view as oldsite.com, renaming all places associated to oldsite.com to newsite.ca in GA.
It’s sort off working now?
Although the site itself is new, the stats you see in the GA dashboard are from their old site (we wanted a continuation of the stats). The Site Kit Dashboard is set to “last 28 days” in my screenshot.
Does everything look normal now, you’d say? I’m not sure if overriding the old site’s analytics might cause issues.
I reuploaded my SVG after I excluded them. Now it’s alright. Their original link is back too, so it’s all peachy.
If I still have problems with this in the future, I’ll let you know.
At that point, why not exclude SVGs by default? To me it only made (all of them) look noticeably worse.
Can I disable only some kind of caching? Without it, the site might get very slow, and I’m not sure I’m ready too take that penality.
How long should it take?
So do you still need more assistance?
Sure. I will take a look tomorrow though since I am about to sleep.
Note that I was running Elementor Pro and ACF at the time, on a very minimal setup and with my own theme, locally.
If there was a conflict, it would be maybe with one of those two.
Good question.
I’ve had it for a while, from my staging environment to my live site. I believe this happened when I started using cloud integration. Here is a screenshot of the plugin page.
My Optimole config reads as follow:
General Enable image replacement > True Scale images & Lazy load > False Enable error diagnosis tool > False Clear cached resource > Has been used multiple times Advanced Compression Enable network based optimizations > True Serve CSS & JS through Optimole > False (True at some point, but caused me problems) Enable Gif to Video conversion > False Image Compression > 75 (Medium) Resize Enable Smart Cropping > True Enable Retina images > True Resize large images original source > 2000 x 1500 Exclusions [0] > Is SVG Cloud integration Enable cloud library browsing > False Enable offloading images > True Offload existing images / Restore offloaded images > All images are synced
I don’t remember doing anything special for this to happen and I don’t remember rolling back the files for this error to appear.
But this is indeed a PHP 8 warning.- This reply was modified 3 years, 7 months ago by Nazrinn.
Hello Vytis,
Yes I did. I flushed the cache of both my plugins multiple times and looked at the SVGs is my incognito browser, but there was no change.
Because I was under time pressure, I simply reuploaded the images on my server. It fixed the problem, but I’d be ready to test it again on my staging environment after the site goes live, if you wish.
Because they are so small, however, I wonder if it’s actually worth the trouble of synchronizing my SVG files using Optimole’s CDN.They’re around 20kb at most, and I feel like the DNS lookup time might not be worth it. Is there a way to exclude them from the CDN like I exclude them from optimization? What should I do?
- This reply was modified 3 years, 7 months ago by Nazrinn.