Porting a WordPress theme to Lyceum

From The Lyceum Wiki

Jump to: navigation, search

(this page will get filled out considerably in the near future)

Things to consider:

  • finer grained permissions. see this code in comments.php:
<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p>
<?php elseif ( get_option('comment_priviliges') && !is_array($userdata->capabilities)) : ?>
<p>You must have permissions on this blog to post a comment.</p>


How to make the search form work

Note: search is dramatically improved in the current Lyceum trunk

  • Look for this text:
action="<?php echo $_SERVER['PHP_SELF']; ?>"
  • Change it to this:
action="<?php bloginfo('home'); ?>/"

Normally this is found the file searchform.php, but if the theme has no such file you might try looking in functions.php.


  • If you are using linux/unix shells, you can use command "ed" to do it automatically.

Firstly, save the following code into "fix.ed".

,s/\$_SERVER\['PHP_SELF'\]/bloginfo('home')/g
w
q

Then find the file to be corrected, suppose it to be "your_file_name.php", then run:

$ed your_file_name.php <fix.ed
Personal tools