seancho
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-EMail] Mail it button non-functionalHi Lester, Thanks for the quick reply. I’ve emailed you a link to the site.
Forum: Fixing WordPress
In reply to: Tags broken post-WP-upgradeThanks, esmi. Your advice turned out to be good. I was skeptical, but when I did the upgrade with plugins deactivated I discovered that a plugin conflict with 3.5.1 was permanently breaking the tags, even after the plugin was deactivated (post-upgrade).
If someone with the same issue finds this thread and is running ‘multi-page toolkit’, then that is your problem. Solution is here:
http://wordpress.org/support/topic/breaks-category-and-tags-permalinks-in-351?replies=2
Forum: Fixing WordPress
In reply to: Tags broken post-WP-upgradeYes
Forum: Fixing WordPress
In reply to: Tags broken post-WP-upgradeI ran the auto-update from inside the WP admin. Everything backed up. I did not disable all plugins before upgrade. I’ve never considered doing that when upgrading.
Anyway, WordPress reported upgrading ok. It is just that now tag pages are 404.
Anyone every encounter something like this?
Forum: Fixing WordPress
In reply to: Styles disappearednvm, I just reimported the files again.
Forum: Fixing WordPress
In reply to: get_post_meta not workingWell, I’ve got it working. This works:
<?php function islink($key){ global $post; $key2 = $key.'_link'; $meta = get_post_meta($post->ID, $key2, true); if($meta != 'null') echo '<a href="',the_field($key2),'">',the_field($key),'</a>'; else echo the_field($key); }?>
I have to use the string ‘null’ instead of ”. I don’t understand it, but at this point I’ll take the working code. There’s something I’m not understanding about get_post_meta.
Forum: Fixing WordPress
In reply to: get_post_meta not workingMakes sense. So in my code, I have now brought $post within the scope of the function:
<?php function islink($key){ global $post; $key2 = $key.'_link'; $meta = get_post_meta($post->ID, $key2, true); if($meta != '') echo '<a href="',the_field($key2),'">',the_field($key),'</a>'; else echo the_field($key); }?> <?php islink('dad');?>
But it doesn’t work. This function returns:
<a href="">Dad</a>
instead of the string ‘Dad’ when the field
dad
is set to ‘Dad’ and the fielddad_link
is unset, ie null.Why? When
dad_link
is null the function should return ‘Dad’.Forum: Fixing WordPress
In reply to: get_post_meta not workingWell, I’m not entirely understanding all this. Scope is a new concept. Putting
global $post;
in the function brings $post into scope, no? But it’s still not behaving as I wish.Late. I will have to read up on all this tomorrow!
Forum: Fixing WordPress
In reply to: get_post_meta not workingOK, so responding to the 2nd suggestion. As I say above, even with
global $post
it still doesn’t work. And I’ll have to look up what that does.I’m using a function because there are 16 places I need that code. So the source code is much lighter and cleaner this way. And besides, it’s my first crack at a php function, so I can’t back down now!
Thanks for info on
global $post
. But I’m still not there, yet.Forum: Fixing WordPress
In reply to: get_post_meta not workingEdit: posted before reading the response above…
Weird.. When I include
global $post;
it is all links again — all null values fordad_link
are ignored and links with a missing URL result –<a href="">
So this is the new code:<?php function islink($key){ global $post; $key2 = $key.'_link'; $meta = get_post_meta($post->ID, $key2, true); if($meta != '') echo '<a href="',the_field($key2),'">',the_field($key),'</a>'; else echo the_field($key); }?>
Strangely, the following code does work, and I don’t understand why..
<?php $key = 'dad'; $key2 = 'dad_link'; $meta = get_post_meta($post->ID, $key2, true); if($meta != 'null') echo '<a href="',the_field($key2),'">',the_field($key),'</a>'; else echo the_field($key); echo get_post_meta($post->ID, $key2, true); ?>
I can run that code on the same page as the other, and it correctly switches between plain text and link text for the
dad
field while the other does not. The echo at the end returnsnull
and92
, which is the ID of the linked page.Anyone understand what is going on?
Forum: Networking WordPress
In reply to: Maximum upload file size: 1MBHa. Outsmarted myself. It’s a setting in the Multisite admin 🙂
For the next dummy that runs into this:
In Network admin, go to Settings and scroll down to Upload Settings at the bottom.
Forum: Networking WordPress
In reply to: Moving multisite to a new hostThank you for that. Beer is good =)
It’s been a long evil slog through Godaddy hell, but all the sites are loading in their new neighborhood. Very happy about that. The last hurdle was a missing .htaccess file that broke redirection and almost made me insane.
BTW, there actually were some references to the old file system in the database…about 10, one for each site, and a few extra to boot. I have no idea what they were for, but I changed them over to the new. Plugins, perhaps?
Forum: Networking WordPress
In reply to: Network Admin 'All Sites' menu brokenYup, apparently I was missing some files. Reupped 3.2.1 and it now works. Thanks for the suggestion.