Nick Ottens
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Search results switch template on Page 2I’ll do that, thanks!
Forum: Plugins
In reply to: [Liveblog] Move liveblog / take out of entry-contentI’m sorry if my opening post wasn’t clear.
What I’m trying to achieve is moving the liveblog container out of the single post.
Currently my single post looks like this:
<article> <div id="entry-content"> <div id="liveblog-container"> [liveblog entries here] </div> </div> </article> <div id="comments">[Moderator note: code fixed. Please wrap code in the backtick character or use the code button.]
I want the liveblog-container to appear between the <article> and <div id=”comments”>
- This reply was modified 8 years, 11 months ago by bdbrown.
False alarm, sorry. There’s something wrong with my own code.
Forum: Themes and Templates
In reply to: [OnePress] Style regular page like home pageUnderstood. Thanks for the suggestions!
Forum: Plugins
In reply to: [Liveblog] Archived liveblog repeats postsI discovered one way to solve this and it involves going into dbadmin, locating the duplicate entries under _comments and manually removing them.
Not a very practical nor elegant solution, of course. If there’s a better way, I’d love to hear it.
Forum: Hacks
In reply to: Open posts as accordion on front pageThat makes sense. So how would I do that?
Thanks for your help.
Forum: Hacks
In reply to: Open posts as accordion on front pageThanks for your reply, Ian.
That works, although not quite the way I want it to. The beauty of Reuters’ design is that clicking the link doesn’t just expand to give you the content, it actually seems to take you to a different page (as in: the URL changes). The usual jQuery Accordions don’t do this, they keep you on the same page. I’ve been searching online for a while but can’t find how to imitate the Reuters system.
Suggestions?
Forum: Plugins
In reply to: [WP Display Header] Change header in another user's profileThat works. Thanks Konstantin!
Forum: Hacks
In reply to: Style post format on home onlyThanks for your reply, bcworkz.
I tried that, adding a content-aside.php, but it doesn’t make a difference because whether it’s the home page or an archive page, it then pulls in that one for the template and I still end up with an image that’s too big.
Forum: Plugins
In reply to: [WP Display Header] Automatically generates header as Featured ImageSorry, figured it out already.
You have to remove the following code from your functions.php:
set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true );Of course, that’ll likely have the effect of being unable to pull in post thumbnails as header on single posts, but that’s something I didn’t plan on doing anyway.
Forum: Plugins
In reply to: Content for single post also appears in category archiveStupid: I forgot to remove the sidebar code from my category.php. Obvious…
Sorry for the superfluous topic!
Forum: Themes and Templates
In reply to: [Toolbox] Change more-linkI’m terribly sorry, should have looked here before I asked.
In case you need to know, replace:
<?php the_content(); ?>With:
<?php the_content('Read more'); ?>That simple!
Forum: Fixing WordPress
In reply to: Grab first link from post for external linkOk, added that to function and tried this is in content.php:
<?php if ( has_post_format( 'link' )) { $content = get_the_content(); $link_string = my_extract_from_string('<a href=', '/a>', $content); $link_bits = explode('"', $link_string); foreach( $link_bits as $bit ) { if( substr($bit, 0, 1) == '>') $link_text = substr($bit, 1, strlen($bit)-2); if( substr($bit, 0, 4) == 'http') $link_url = $bit; }?> <h1 class="entry-title"><a href="<?php echo $link_url;?>" title="<?php _e('External link';?>"><?php echo $link_text;?></a></h1><?php } else { ?> <h1 class="entry-title"><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> <?php } ?>But it doesn’t work. I must have done something wrong there with the code because the page won’t even load….
Forum: Fixing WordPress
In reply to: Grab first link from post for external linkThe post title should point to the external link, so I suppose my question is: how do I reference that external link which I’ve just “grabbed”?
Forum: Fixing WordPress
In reply to: Grab first link from post for external linkYes, but what do I want to display? Both the content.php and content-link.php link to the permalink in the title.