kasperbs
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Development environment for huge WP networkI just came across this search/replace script, which looks like it takes care of serialized wp_option records too:
This works very well for what its supposed to do.
Forum: Plugins
In reply to: Modifying WP Plugin source code in WPMU environmentAhh ok. that’s what I thought. I don’t know how to code plugins unfortunately :-(.
Forum: Plugins
In reply to: Modifying WP Plugin source code in WPMU environmentI was actually thinking generally. For example; I have a twitter plugin that consists of one file called twitter.php. In that file I need to specify the number of tweets to show.
Let’s say I want to activate this plugin on another site but on that site show 5 tweets. How do I do that in a multi site environment? I still only have that file right?
Forum: Plugins
In reply to: Modifying WP Plugin source code in WPMU environmentThanks.
Would mind ellaborating on the ‘save that as an option’ thing?Forum: Fixing WordPress
In reply to: Problem with RSS feeds. array_alice errorIt now looks like this.
<?php include_once(ABSPATH.WPINC.'/rss.php'); // path to include script $feed = fetch_rss('https://pipes.yahoo.com/pipes/pipe.run?_id=e49a6cfb219f8180ded1313941be1808&_render=rss'); // specify feed url if( is_object( $feed ) && property_exists( $feed, 'item' ) && is_array( $feed->items ) ) { $items = array_slice($feed->items, 0, 5); } // specify first and last item ?> <?php if (!empty($items)) : ?> <?php foreach ($items as $item) : ?> <div class="post"> <h1 class="post-title"><a href="<?php echo $item['link']; ?>"><?php echo $item['title']; ?></a><?php edit_post_link(' EDIT', '<span>', '</span>'); ?></h1> <?php if (isset($item['description'])) : ?> <div class="entry"><?php echo $item['description']; ?></div> <?php endif; ?> </div> <?php endforeach; ?> <?php endif; ?> <?php if (empty($items)) : ?> <p><em>Der blev ikke fundet nogen aktuelle nyheder p? de s?gte medier.</em></p> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Problem with RSS feeds. array_alice errorWoow thanks. Patience paid off. I will implement it now.
Forum: Fixing WordPress
In reply to: Problem with RSS feeds. array_alice errorThis is actually still a problem, if anyone have any input.
A contact name or email address would be fine, as we can pay for fixing this.
Forum: Fixing WordPress
In reply to: Problem with RSS feeds. array_alice errorAnyone know who I could contact about this problem?
Forum: Fixing WordPress
In reply to: Problem with RSS feeds. array_alice errorNo one in here either?
Forum: Plugins
In reply to: Show posts based on page-authorHi,
Thanks for your suggestion. I don’t think it would work because basically the authors act as categories. Anyway I just came back to let you know that I managed to find a solution.Here’s the template code I ended up with if anyone needs the same.
<?php /* Template Name: Netvaerk News */ ?> <?php get_header(); ?> <div class="span-16 last"> <div class="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h1 class="post-title">Nyheder & Aktiviteter</h1> <div class="entry"> <?php $page_author = get_the_author();?> </div> </div> <?php endwhile; endif; ?> <?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('showposts=5&cat=383&author_name=' . $page_author . '&paged=' .$paged); ?> <?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a><?php edit_post_link(' - EDIT THIS', '<span>', '</span>'); ?></h1> <div class="post-meta"><?php the_time('j. F, Y') ?></div> <div class="entry"> <?php the_excerpt(); ?> <p style="margin-top:-1em;"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">» Læs mere...</a></p> </div> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Ældre') ?></div> <div class="alignright"><?php previous_posts_link('Nyere »') ?></div> </div> </div> </div><!-- end of span-17 --> <?php get_footer(); ?>
Forum: Fixing WordPress
In reply to: Can’t list child pages of homeThanks,
Managed to get it to work. Here my full code that lists subpages:<?php // list sup pages if (is_home()) : global $wpdb; $home_page_id = $wpdb->get_var("SELECT OPTION_VALUE FROM $wpdb->options WHERE option_name = 'page_for_posts'"); $children = wp_list_pages("title_li=&child_of=".$home_page_id."&echo=0"); elseif($post->post_parent) : $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else : $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0"); endif; if ($children) : ?> <ul> <?php echo $children; ?> </ul> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Can’t update a page – Being redirected to blogs front pageThis turned out to be a problem with the WP Firewall plugin. Whitelisting my IP address solved the problem.
Forum: Fixing WordPress
In reply to: Warnings after WP update?Thanks for your quick reply.
Forum: Fixing WordPress
In reply to: Can’t log in to backend due to parse error !URGENT!I managed to sort this by getting the FTP access, but didn’t figure out a way to fo it without!
Forum: Fixing WordPress
In reply to: Using wp_query to show a random post from a specific categoryThanks for the links. I had a look at them and think it might be a little too technical for me.
I’ve decided that I don’t need the custom field image value anyway. I simply need a random post from the ‘Event’ category displayed at the top of my index page.