jakemc
Forum Replies Created
-
After much digging I found this solution:
I got the id of the postmeta entry :$assoc_users_sql = "SELECT m.meta_id, u.user_login FROM $wpdb->postmeta m, $wpdb->users u WHERE m.post_id = $post->ID AND m.meta_key = 'mo-user' AND m.meta_value = u.ID ORDER BY u.user_login ";
For each listed user I used the id of the postmeta entry instead of the meta_value:
<input type="submit" name="deleteuser[<?php echo $a_user->meta_id; ?>]" class="deleteuser" value="Delete" />
and then delete_meta to remove the record:if ( isset($_POST['deleteuser']) && $_POST['deleteuser'] ) { foreach ( $_POST['deleteuser'] as $key => $value ) { delete_meta($key ); } }
Here’s the pastebin URL:
https://wordpress.pastebin.com/3tRCzjuQThanks in advance.
Forum: Fixing WordPress
In reply to: shortcode executed before contentIf anyone has the same problem, the answer is that the contents of the ataglance_function should be returned not echoed.
Jake
Forum: Requests and Feedback
In reply to: WP 2.5 Post SlugsFor my install of WP 2.5, the slug does not appear for editing if the page being edited is selected as Front Page in Reading Settings.
Hope this helps.
Forum: Plugins
In reply to: Anyone Interested in a plugin that…+1 mantone
I’m particularly interested in being able to tag uploads (fiiles as well as images), or at least assign them to categories (as you can with ordinary posts).
Have you made any progress?
Forum: Plugins
In reply to: Get the category id on the archive pageGreat. Thanks Jonski.
Forum: Plugins
In reply to: Get the category id on the archive pageI hadn’t realised it was quite that simple! Thanks Jonski.
Do you know if it’s possible to get the other category attributes from the ID without going directly to the database (using get_var of course)?
Forum: Plugins
In reply to: Discussion List Plugin?HI drsuccess. Did you get anywhere with this? I’m looking for something similar. I’ve found wp-mailman but all documentation seems to have vanished and I can’t get it to work!
Forum: Plugins
In reply to: Detect more link when filtering the_contentI’ve found this which seems to do exactly what I need:
https://www.ayanev.com/marketingtrick-release-10-887/
Thanks anyway!
Forum: Plugins
In reply to: Detect more link when filtering the_contentThanks alakhnor.
Do you mean:
function alt_the_content () { global $post; $page = str_replace("<!--more-->","MORE LINK",$page); the_content(); }
?
Same result ??
Any more suggestions? Even some documentation about how the_content() is processed might be helpful…
Forum: Plugins
In reply to: Detect more link when filtering the_contentSorry that should be:
function alt_the_content () { global $post; $post->post_content = str_replace("<!--more-->","MORE LINK",$post->post_content); echo $post->post_content; }
This replaces the <!–more–> but removes all formatting.
function alt_the_content () { global $post; $post->post_content = str_replace("<!--more-->","MORE LINK",$post->post_content); the_content(); }
This displays the_content() as normal and doesn’t seem to replace the <!–more–>
Incidentally, I want to replace <!–more–> *and all the text that comes after*. Should I use preg_replace or is there a more elegant way to do this?
Thanks again.
Forum: Plugins
In reply to: Detect more link when filtering the_contentThanks alakhnor, but that doesn’t quite work
If I replace the_content() in my theme with alt_the_content() and define:
function alt_the_content () { global $post; str_replace("<!--more-->","THIS IS WHERE THE MORE LINK IS",$post->post_content); the_content(); }
… the_content() still carries on as normal and strips out the <!–more–>. I can replace <!–more–> if I use $post->post_content but then have to echo $post->post_content and lose all HTML formatting.
Any more ideas (and I’d still rather use a filter so I can leave the_content() be in my theme…)?
Forum: Plugins
In reply to: WordPress 2.1 upload managerTry this excellent plugin:
https://blog.japonophile.com/flexible-upload/Forum: Plugins
In reply to: WordPress meets Yahoo groups type pluginHi Feridem.
Try starting a new topic for this – it doesn’t relate to my original question and so it probably won’t get picked up.
Good luck!
Jake
Forum: Fixing WordPress
In reply to: on search enginesI think the question is this: how do I set the categories slug to nothing? I have the option to customise it but if I leave it blank it’s set to the default (“archives”).
Thanks.