stoicboy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Dealing with exploit related issuesI ran the plugin, and it appears those were the only two files the plugin picked up. It did not appear any posts or database entries were infected based on the scan … which makes sense due to the way it presented the content. (I did an unminify of the JS file and it showed it was forwarding to some weird Russian site). I’m going to talk with the guy about changing the password and updating the SALT files then going from there.
Forum: Plugins
In reply to: [Plugin: Front-end Editor] Doesn’t play nice with custom field variablesOK, I have another issue that came up. I noticed that your code places everything in <div> tags. Is there a way to place it in <span> tags instead? The <div> blocks out columns and kinda breaks my design.
Thanks again for the help!
Forum: Developing with WordPress
In reply to: Custom Fields on RSS feed: how to?Hi Eric,
I actually finally figured it out. I made a similar data loop for the RSS feed using a hacked version of the Tadlock plugin.
https://justintadlock.com/archives/2008/01/27/custom-fields-for-feeds-wordpress-plugin
The feed looks great now. I’m quite happy with it.
Thanks for the help and the kind words!
Forum: Developing with WordPress
In reply to: Custom Fields on RSS feed: how to?ericr23: Wow, that’s really useful.
Here’s my question for you: I currently have my site (https://shortformblog.com/) set up with an RSS feed designed from a hacked plugin that uses an array call and a bunch of different styles based on the custom field. It’s worked OK so far but occasionally things come in out of order. And right now, for no good reason, everything’s coming out in reverse order.
I want to hardcode the order using a bunch of if-then-else statements, like I have it set up on my blog. The method you use … can it be used in such a fashion.
To give you an idea, here’s how the code is hacked up at the moment. I left a couple of things out; this is merely to show how I break up code currently:
// $pass_keys - Array of allowed custom keys. Modify to your needs. $pass_keys = array('bignumber', 'bignumberwords', 'bignumberb', 'bignumberwordsb', 'quote', 'attribution', 'factboxhed', 'factbox', 'factboxhedb', 'factboxb', 'factboxhedc', 'factboxc', 'grabbag', 'grabbagb', 'grabbagc', 'grabbagd', 'grabbage', 'tightcrop', 'cutline', 'embed', 'cutlinefull', 'source');
function szub_line_mode($key, $value, $sep, $list_mode) { switch( $list_mode ) { case 'p': if ($key == 'quote'){ echo '<h1 style="line-height:normal; font:bold italic;">“' . $value . '” </h1>';} elseif(in_array($key, array('bignumber', 'bignumberb'))){ echo '<h1 style="line-height:normal; color:#c00c20;">' . $value . ' </h1>';} elseif($key == 'tightcrop'){ echo '<img src="' . $value . '"> ';} elseif(in_array($key, array('factboxhed', 'factboxhedb', 'factboxhedc'))){ echo '<h3 style="color:#c00c20;">' . $value . ' </h3>';} elseif($key == 'grabbag'){ echo '<h2 style="line-height:normal; color:#c00c20;">One</h2><p>' . $value . '</p>';} elseif($key == 'grabbagb'){ echo '<h2 style="line-height:normal; color:#c00c20;">Two</h2><p>' . $value . '</p>';} elseif($key == 'grabbagc'){ echo '<h2 style="line-height:normal; color:#c00c20;">Three</h2><p>' . $value . '</p>';} elseif($key == 'grabbagd'){ echo '<h2 style="line-height:normal; color:#c00c20;">Four</h2><p>' . $value . '</p>';} elseif($key == 'grabbage'){ echo '<h2 style="line-height:normal; color:#c00c20;">Five</h2><p>' . $value . '</p>';} elseif($key !== 'source'){ echo '<p>' . $value . ' </p>';} elseif($key == 'source'){ echo ' <a href="' . $value . '" target="_blank">Source</a> ';} elseif($key !== ''){ echo '<p>' . $value . ' </p>';} } } add_filter('the_content', 'szub_custom2feed', 9);
And to give you an idea, this is what I do with the code on the frontend of the site:
<?php //Get source $source = get_post_meta($post->ID, 'source', $single = true); ?> <?php // PULL QUOTE // Get quote $quote = wptexturize(get_post_meta($post->ID, 'quote', $single = true)); // Get attribution $attribution = wptexturize(get_post_meta($post->ID, 'attribution', $single = true)); // If post is in a series if($quote !== '' & $attribution !== '' & $source == '') { // Echo the post style echo '<div class="quotebox"> <p class="pullquote">' . $quote . '</p> <br /> <p class="attribution">'. $attribution . '</p> </div>';} else if($quote !== '' & $attribution !== '' & $source !== '') { // Echo the post style echo '<div class="quotebox"> <p class="pullquote">' . $quote . '</p> <br /> <p class="attribution">'. $attribution . ' • <a class="source" href="' . $source . '" target="_blank">source</a> </p> </div>';} ?>
Is this possible to duplicate (or at least equivocate) in RSS?
Thank your for this code! I was freaking out a little when I noticed it disappeared because people tumble my site, ShortFormBlog, all the time, and it left a pretty ugly beauty mark visually.
Nice save man!
Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin] YARPP and custom fields@mitchoyoshitaka But where does that leave sites like mine (ShortFormBlog, https://shortformblog.com/), which use nothing but custom fields to post information? It’s not just metadata. It’s content.
Forum: Plugins
In reply to: Giving custom fields a specific order in an RSS feed?Actually, it appears that one of my other plugins, Custom Field Template, was to blame. I switched to More Fields and it looks fine now. And More Fields is easier to use, to boot.
Forum: Plugins
In reply to: Giving custom fields a specific order in an RSS feed?Bumpage. Any help?
Forum: Fixing WordPress
In reply to: Extra tab being added between wp_list_categories LI?One more bump. Whoo.
Forum: Fixing WordPress
In reply to: Extra tab being added between wp_list_categories LI?Thanks! I appreciate the compliment. I’ve been working very hard on this. ??
Anybody have any advice on this particular problem?