Adam
Forum Replies Created
-
Forum: Plugins
In reply to: [Device Wrapper] Strange white line below content (MacBook Pro 2023)Thank you! Just left a glowing review; I wish there was more I could to help you out. (I don’t have any socials, so sharing is just word of mouth to other WP folks.)
Forum: Plugins
In reply to: [Device Wrapper] Constant previewing errors in the editorThank you, Bogdan! Quick update:
I just bought/installed premium version, and the problem went away. So it seems to be only an issue with the free one.
Thanks much for the quick reply! I tried implementing this for an hour this morning and couldn’t get anywhere. I’ll reinstall if you decide to include native support for media/galleries.
Yup, you got it right, basically. I don’t know why I can’t remove those old post types (I’ve cleared all my caches and even manually scrubbed my DB), but regardless, I definitely don’t want them to appear. Thanks for the snippet!
Yes, that’s great! I realize now, though, that it’s stripping out all my HTML, including line breaks. I’ve looked around for some code to address that, but I’m getting a WSOD. Would you add that to the above code for me (and anyone else that needs it)?
Thanks so much, again.
Interesting. I don’t have another gallery plugin, and I’ve deactivated everything else. I should have mentioned that I’m using Twenty Twenty.
I had a hunch just now, and tried deactivating Jetpack’s CDN. Images appear at the right size—they just load slow as hell. I think the issue is on Jetpack’s end.
Thanks for looking into it!
Hey Ben,
Sorry for my slow reply. Yes, that’s very helpful, and thanks also for your explanation—keeps me from trying to find something that doesn’t exist!
I’m using the galleries for my portfolio. Ideally, whoever comes to my site would see them in a random order. Given how elegant the plugin is, and how good it’s making me look, it’s not a big deal that I can’t get the random order, too.
Cheers,
AdamFixed. I posted the same question on Stack Overflow. For anyone who’s having the same or similar trouble, here was the solution:
function single_add_to_content( $content ) { if( is_single() ) { // These are the custom field keys defined in the dashboard: $metas_links = array( 'website', 'album', 'tour', 'twitter', 'facebook', 'bandcamp', 'soundcloud', 'youtube', 'instagram', 'linkedin', 'myspace', 'image', ); // If _any_ ACF field is filled in, it's a go. $has_meta = false; // init foreach ($metas_links as $test ) { if ( get_field($test) ) { $has_meta = true; continue; // Just need one meta field filled to create the div. } } if ( $has_meta ) { $content.= '<div class="custom-data artist-links">'; $content.= '<h2 class="artistname">'.get_field('name').'</h2> <center><strong>'.get_field('tribe').'</strong></center>'; foreach ( $metas_links as $meta_links ) { $$meta_links = get_field($meta_links); if ( $$meta_links ) { $f_object = get_field_object($meta_links); $label = $f_object['label']; $content.= '<div class="' . $meta_links . '">' . '<a href="'. $$meta_links .'" target="blank"><span class="label">' . $label . '</a></span>' . '</div>'; } } $content.= '</div><!-- /.custom-data -->'; } } return $content; } add_filter( 'the_content', 'single_add_to_content' );
As I continue to play with it, I think I can clarify what I need help with. I’m specifically struggling with add_action and do_action. I’m pretty sure my add_action should go in the functions.php (or a plugin file), and the do_action in the single.php. I’m getting the following errors pretty frequently:
call_user_func_array() expects parameter 1 to be a valid callback, no array or string given
and
Missing argument 2 for add_action(),
Forum: Reviews
In reply to: [Gutenberg] Love it, but still I don’t understand+1 to @vincentjflorio.
Forum: Plugins
In reply to: [AdPlugg WordPress Ad Plugin] Ads won’t display in sidebarThanks, Collin.
I just reloaded the page, and still don’t see an image there. I’ll look at it again in a few hours. If it’s not working by the morning, where can I send you login details?
best,
AdamForum: Plugins
In reply to: [AdPlugg WordPress Ad Plugin] Ads won’t display in sidebar—
- This reply was modified 7 years, 9 months ago by Adam.
Forum: Plugins
In reply to: Remove first image and caption from posts?@mc_kot, unfortunately no. In the end, the client paid someone to remove all first images manually. So, sad face.
Forum: Plugins
In reply to: [Yoast SEO] Site Description in Search Engines@anelson531, I just added it in the “meta description template” (which is bizarrely counterintuitively named, and is too short to show all 160 characters available): https://www.yoursite.com/wp-admin/admin.php?page=wpseo_titles#top#home
I recommend using https://www.wordcounter.net to make sure your description is between 140–160 characters, or Google may not accept it.
I tried putting the description in other places, then removed them, so I’m 98% sure that’s where it’s drawing it from. Again, seems to take Google a minute to put it in line, then do its crawl.
Forum: Plugins
In reply to: [Yoast SEO] Site Description in Search Engines@anelson531, I think I found the answer.
I can’t say if it was correlation or causation, but after setting up my site in Google Webmaster Tools, then submitting a sitemap—then waiting at least 12 hours—the site description did at last show up.
Hope that helps.