dbirlew
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Woocommerce breaking comments_popup_linkThank you Hannah @fernashes! Much appreciated.
Forum: Developing with WordPress
In reply to: update_post_meta doesn’t work with variable key/values?@catacaustic: Ah! Makes sense, I’ve only ever used die() in a limited fashion.
My mistake was that even though I was instantiating the object outside of any function, I was adding all my individual option objects to the managing object within a function. ?? Moving that code outside of a function worked, as the managing object remained blank to all except the single function.
I’ll need to reorganize code, and quite a bit, but I think I can make this work now! ??
Forum: Developing with WordPress
In reply to: update_post_meta doesn’t work with variable key/values?Thanks @catacaustic but unfortunately this is called on the save_post action, so the page reloads before any additional strings can be displayed.
UPDATE: I managed to save the values! Unfortunately, I did it by re-instantiating the object within my save_theme_options function, adding the options back to it again, and updating the page.
So the problem is that attempting to carry the already existing object into save_post isn’t working, for some reason, even though it accepts the $post_id quite readily. Might be a simple PHP syntax solution, so I’ll research more along those lines… unless anyone can shed light.
Thanks!
Forum: Plugins
In reply to: [Breadcrumb NavXT] Proper filter to insert Page link after "Home"RESOLVED: Thank you John for all your help. array_splice just wasn’t having it, I’m not sure why, but it would break the page and the rest wouldn’t load. Here’s an example of what finally worked, for other users’ benefit:
function filter_my_breadcrumbs($obj){ //create a breadcrumb that links to the custom post type archive page: $archive = new bcn_breadcrumb( 'Archive Page', NULL, array('archive', 'taxonomy', 'my-categories'), home_url() . '/archive-page' ); //Insert the breadcrumb above into trail after HOME on custom taxonomy pages and custom single posts: if(is_tax('my-categories') || is_singular('cpt')){ //Pop the HOME link off the end of the (reverse) array: $home = array_pop($obj->trail); //Push the $archive breadcrumb from above onto the end of the (reverse) array: array_push($obj->trail, $archive); //Return the HOME link: array_push($obj->trail, $home); } } add_action('bcn_after_fill', 'filter_my_breadcrumbs');
Forum: Plugins
In reply to: [Breadcrumb NavXT] Proper filter to insert Page link after "Home"Thank you for the pointers and yes, injecting a new breadcrumb into the trail is quite a bit different than removing one. ?? Here’s what I’m trying so far, it’s not working but I will continue debugging it until I sort out (all) the class inter-operations:
add_action('bcn_after_fill', 'vpm_filter_breadcrumbs'); function vpm_filter_breadcrumbs($trail){ if( is_tax('vpm-categories') || is_singular('vpm') ){ $breadcrumb = array( $title = 'ISSUES', $template = __('<span typeof="v:Breadcrumb"><a rel="v:url" property="v:title" title="Go to %title%." href="%link%" class="%type%">ISSUES</a></span>', 'breadcrumb-navxt'), $url = home_url() . '/issues', $type = array('archive', 'taxonomy', 'vpm-categories', 'current-item') ); $vpmlink = new bcn_breadcrumb($args); array_unshift($trail->breadcrumbs, $vpmlink); } }
Forum: Plugins
In reply to: [Story Highlights] Questions regarding placement, tag and RSSSorry that I’m just now seeing this. I believe I just answered these same questions on my Facebook page, but if anyone else has similar questions then here are my answers:
1. You always seem to have a first image in your post, you should consider changing your template file so that the_post_thumbnail is displayed above the post, and this will move the image above the Story Highlights. (You’ll also find it more efficient to set a Featured Image than to insert a top image, every time.) Another fix for this is to set the first image to alignleft (the same alignment as Story Highlights) and this will produce a wrapping effect with the text.
2. I will consider whether this suggestion is good SEO or not and update the plugin as necessary, thank you.
3. I checked your feed (which is at https://freesmi.by/katastrofy/feed btw) and I do not see the Story Highlights appearing in any of the feeds. However in my next release I will make sure that it does not appear in feeds as I don’t think it is relevant to RSS either, so thank you for the suggestion.Those fixes did not help me with this issue; did you read my last post above?
Posts are not auto-tweeting, neither on Publish or when a schdeduled post is published. Please advise, thanks.
I deactivated the Twitter account by clicking the little x next to it, then saved the options. When I returned to the Twitter Options I could see the following error above Add a Twitter Account button:
Warning: Invalid argument supplied for foreach() in /home/danbir5/public_html/lvmb/wp-content/plugins/pretty-link/pro/classes/views/prlipro-options/form.php on line 177
When I clicked the button and authorized the app on Twitter, it returned me to my site. However, it was a white PHP error page with the following errors:
Warning: Invalid argument supplied for foreach() in /home/danbir5/public_html/lvmb/wp-content/plugins/pretty-link/pro/pretty-link-pro.php on line 1642
Warning: Cannot modify header information – headers already sent by (output started at /home/danbir5/public_html/lvmb/wp-content/plugins/pretty-link/pro/pretty-link-pro.php:1642) in /home/danbir5/public_html/lvmb/wp-content/plugins/pretty-link/pro/pretty-link-pro.php on line 1673
Just an update after this occurred, I wonder if it sheds some light. I will schedule another post and update you tomorrow on whether it auto-tweets yet.
I set up PrLiPro on another site and scheduled a post. The plugin created the Pretty Link when the post went live, it wasn’t doing that previously so that part is fixed. However the plugin did not publish the title and link to Twitter. So perhaps since the API has changed there is some new hook for auto-tweeting?
Also, so I remove and reconnect the Twitter account? Might that help at all?
@cartpauj Unfortunately I made the above changes to the file on Friday, but today my client says they still had to update the scheduled post after it went live in order to create the Pretty Link. I’m going to test it on a test site a little later, but until then is there anything else you can think of to fix auto-tweet on scheduled post update? Thanks.
I’m afraid the problem persists with scheduled posts not auto-tweeting. If you publish a post regularly then the auto-tweet fires right away, I tested it on my dev site with another Twitter account, so updating the Twitter API folder fixed that much. However if a post is scheduled, the pretty link is not created and an auto-tweet does not go out when the scheduled post goes live. Instead when you edit that post, the Pretty Link meta box shows the following message: “A Pretty Link hasn’t been generated for this entry yet. Click “Update Post” to generate.” You must then click update, but even then an auto-tweet does not fire. The client has to go to the post and click the share button on the social bookmark bar. So we obviously need to look at the logic for tweet creation, do you happen to know where that code resides? Thanks again for your help.
Oh, well, that was nice of Twitter now wasn’t it? ?? Thank you for the response cartpauj I have made the change to my client’s site and hopefully we’ll see the difference when her next post goes out, probably tomorrow. I’ll let you know otherwise, but thanks!
Forum: Fixing WordPress
In reply to: Complete media failure since 3.5.1 upgradeUPDATE: Just attempted reinstall of WordPress files: kept wp-content, deleted all other files, uploaded WP and did overwriting of wp-content. The problem persists.
Enabled database repair and ran the script. Some database errors could not be repaired. The script instructed me to copy/paste the following to these forums for help:
wp_posts: 5 clients are using or haven’t closed the table properly
wp_comments: 4 clients are using or haven’t closed the table properly
wp_options: 6 clients are using or haven’t closed the table properly
wp_postmeta: Table is marked as crashed
wp_terms: 1 client is using or hasn’t closed the table properly
wp_term_taxonomy: 4 clients are using or haven’t closed the table properly
wp_term_relationships: 1 client is using or hasn’t closed the table properlyAnyone who can tell me how to fix these errors gets a cookie.
Forum: Fixing WordPress
In reply to: Complete media failure since 3.5.1 upgrade@stevec106 No luck yet but if you checked the notify me of follow-up posts via email checkbox below the reply box then you should get notices.
I am currently running another site elsewhere on 3.5.1 and building another site offline using the same version. Neither has problems with featured images. So I’m thinking one clear solution may be… reinstall WordPress. None too happy at the thought but it might clear up the issue.