Nick Ottens
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Grab first link from post for external linkThanks esmi.
I see the relevant code in functions.php is this:
function twentyeleven_url_grabber() { if ( ! preg_match( '/<a\s[^>]*?href=[\'"](.+?)[\'"]/is', get_the_content(), $matches ) ) return false; return esc_url_raw( $matches[1] ); }Is it possible to pull this off without creating a separate content-link.php though?
Forum: Fixing WordPress
In reply to: Too many redirects on attachmentI found that removing the following part from the code
. main '#main'did the trick.
Forum: Fixing WordPress
In reply to: Too many redirects on attachmentLocated the problem!
In functions.php there’s this snippet:
/** * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages */ function toolbox_enhanced_image_navigation( $url ) { global $post; if ( wp_attachment_is_image( $post->ID ) ) $url = $url . '#main'; return $url; } add_filter( 'attachment_link', 'toolbox_enhanced_image_navigation' );If I take it out, the redirect loop disappears but judging from the description (“previous/next”) it also means I can’t have galleries now anymore?
Forum: Fixing WordPress
In reply to: Too many redirects on attachmentTurns out the plugin interferes with the WPtouch plugin… 🙁
Forum: Fixing WordPress
In reply to: Too many redirects on attachmentI found the Permalink Fix & Disable Canonical Redirects Pack plugin takes care of the problem but I would love to have a better solution.
Forum: Plugins
In reply to: [Toolbox] Add category name to Toolbox post header / entry-meta*Bump*
Anyone thoughts?
Forum: Hacks
In reply to: Replace required asterisk with textI guess that should work but it doesn’t…
Forum: Hacks
In reply to: Replace required asterisk with textThanks jdavhar. That means I have to put the full code of the comments form on my comments.php though where it currently just calls the form with a simple, single line of code. I know it’s supposed to be possible to change specific things about the default form in the functions.php which would be a more elegant solution.
Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin 3.4.2] Adding thumbnail to widgetThanks chadrew! That seems to work splendidly.
Forum: Hacks
In reply to: Replace required asterisk with textI found that but I can’t get it to work yet. I’m not that experienced at coding. If someone could show me an example, that would help.
Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin 3.4.2] Adding thumbnail to widgetI think it’s impossible to have different coding for the related posts between the sidebar and the body. It’s not a huge problem for me because I want them only displayed in the sidebar from now on.
So, the only question I’ve left is: is it possible to display only the thumb on the first post?
This is my template code now:
if ( $related_query->have_posts() ) { echo '<ul>'; while ( $related_query->have_posts() ) { $related_query->the_post(); ?> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'toolbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. the_post_thumbnail('medium'); } ?></a> <li> <h1><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'toolbox' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h1> <div class="entry-meta"><?php toolbox_posted_on(); ?></div> </li></a>Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin 3.4.2] Adding thumbnail to widgetI did, yes, but I suppose I have to make changes to the yarpp-template-arras.php to affect the style of the widgeted related posts, no?
After all, right now, it only displays the titles of linked posts, not the time and no excerpt which are displayed in the related posts fields that’s in the body of my posts.
(I want to move the related posts field from the body to the sidebar so I won’t need any styling for the former anymore.)
Forum: Plugins
In reply to: [Plugin: Yet Another Related Posts Plugin 3.4.2] Adding thumbnail to widgetThanks for your message. I did that but it only affects the style of the related posts field when it’s displayed in the body of the post. Am I missing something?
Here’s my yarpp-template-arras.php:
<?php /* Template for Arras WP Theme This template returns the related posts, Arras way. Author: zy (Melvin Lee) */ if ( $related_query->have_posts() ) { echo '<ul class="related-posts">'; while ( $related_query->have_posts() ) { $related_query->the_post(); ?> <a href="<?php the_permalink() ?>"><li class="clearfix"> <span class="hidden"><?php the_post_thumbnail( 'node-based-thumb', get_the_ID() ) ?></span> <p class="title"><?php the_title() ?></p> <p class="date"><?php the_time( __('F d, Y', 'arras') ); ?></p> <p><?php echo get_the_excerpt() ?></p> </li></a> <span class="hidden"><a href=""><li class="clearfix"> <p class="title">Your Advertisement Could Be Here</p> <p class="date">Advertisement</p> <p>Advertise on a single article page with a promotion that is neatly integrated in the layout of the "Related posts" lineup.</p> </li></a></span> <?php } echo '</ul>'; } else { echo '<span class="textCenter sub">' . __('No posts at the moment. Check back again later!', 'arras') . '</span>'; }Forum: Plugins
In reply to: Problems with Tumblrize and image captionsAnyone know how to do that?
Forum: Plugins
In reply to: Problems with Tumblrize and image captionsTo clarify, what I get on Tumblr is:
[caption id=”attachment_11760” align=”alignright” width=”300” caption=”Test”] IMAGE [/caption]
With Tumblr being unable to read the “caption” code.