Tag Info

Hot answers tagged

3

Rather than modifying the template, since you're going to need jQuery anyway, you can do this.. Add to the functions.php add_action( 'wp_enqueue_scripts', 'blogroll_toggles' ); function blogroll_toggles() { if( is_page_template( 'bookmarks.php' ) ) wp_enqueue_script( 'blogroll-toggle', get_bloginfo( 'stylesheet_directory' ) . ...


2

I've tried something similar to that (well, slightly different, what I did was try to create a timeline where posts and comments showed up in the same timeline)... Merging those two arrays is not easy, because the post object has completely different properties to the link object. If you wanted to do it, you'd have to run an array map over the response ...


2

I know of three ways around this and unfortunately they all suck: Hack a core file Use a plugin Temporarily turn off scripgs in your browser and change them in the edit links section.


2

You can filter your blogroll to make all links nofollow with a function like this: function nofollow_blogroll( $html ) { // remove existing rel attributes $html = preg_replace( '/\s?rel=".*"/', '', $html ); // add rel="nofollow" to all links $html = str_replace( '<a ', '<a rel="nofollow" ', $html ); return $html; } add_filter( ...


2

I coded my own answer together using a filter and dynamic_sidebar_params: <?php add_filter('dynamic_sidebar_params','io_blogroll_class'); function io_blogroll_class($params){ $params[0]['before_widget'] = '<li class="'.$params[0]['widget_name'].' box">'; $params[0]['after_widget'] = '</li><!--'.$params[0]['widget_name'].'-->'; ...


2

Creating 2 queries for your scope is absolutely an not need work... Use only one query and use the $wp_query->current_post property to change the output of first post.. $args = array ( 'pagination' => true, 'paged' => $paged, 'posts_per_page' => '10', 'ignore_sticky_posts' => true, ...


1

there is a plugin called "better blogroll" I guess it would help you do what you want . I had it installed on one of my sites, but site currently down , so can't really test - but as far as i remember it does the work u asking for http://www.dyers.org/blog/better-blogroll-widget-for-wordpress/ give it a look anyway and when my site is back up , i will ...


1

The issue here is that you haven't queried any posts. Before have_posts try adding something like, query_posts( 'posts_per_page=5' );


1

There are two ways to get what you want. Link Manager Go to wp-admin/link-manager.php, add a new link and enable the Links widget inwp-admin/widgets.php in one of your sidebars. However, the link manager will be removed in the next version (WP 3.5). It will be converted to a plugin. I would not rely on it. Custom Menu Create a new custom menu in ...


1

From the codex: "As of Version 3.5, the Links Manger and blogroll are hidden for new installs and any existing WordPress installs that do not have any links. If you are upgrading from a previous version of WordPress with any active links, the Links Manager will continue to function as normal. If you would like to restore the Links panel to your install you ...


1

You could use the normal wp loop (no need for complications) and get_bookmarks($args) to get the links you want. Something like this: $i = 1; <?php if (have_posts()) : while (have_posts()) : the_post(); ?> //your posts here if ($i&1) echo 'blogroll '.$i;//blogroll 2, 4, etc. $i++; <?php endwhile; endif; ?>


1

Thanks to everyone. Here is the solution that I ultimately ended up with. Rather than messing around in the loop itself, I chose to hook into the_post with a function that recreates the markup of the loop using data from $links. <?php global $links; global $links_count; $links = get_bookmarks("limit=5"); function dg_archive_insert_links(){ ...


1

Use wp_insert_link().


1

Why not loop through the bookmark ID's and assign it to a div, along the lines of <div id="bookmark-<?php $bookmark_id(); ?> using get_bookmark to get the ID's, $bookmark_id = get_bookmark(....);


1

there is a widget pagination plugin available now, have a look: http://wgpag.jana-sieber.de/ does that help you? cheers, jana :-)



Only top voted, non community-wiki answers of a minimum length are eligible