WordPress search fails with error
After a recent upgrade, the following WordPress error was being displayed for searches:
Parse error: syntax error, unexpected 'new' (T_NEW) in search.php on line
After a recent upgrade, the following WordPress error was being displayed for searches:
Parse error: syntax error, unexpected 'new' (T_NEW) in search.php on line
The LocalGeek web site (www.localgeek.us) uses a child theme of Figero. Special attention needs to be taken when updating this theme, to avoid overwriting important files.
The following files and folders should be kept in the figero-child folder, which should avoid this issue, allowing the parent figero folder to be updated with new files. Read more »
It’s (very) possible to migrate WordPress content (posts & pages) between different WordPress sites. In fact, WordPress has a native import/export plug-in.
You can select the entire site content or break it down by category (Warning: if your site is large, consider breaking it into smaller chunks to avoid PHP timeouts with your web host).
Here’s how to add a “log-in/log-out” link to WordPress which is based on the current login state.
Note that there is a CSS class called “loginlink” which can be styled as needed. You may need to include an !important declaration to override default styles.
<?php if ( is_user_logged_in() ) { echo '<a href="'.wp_logout_url( get_permalink() ).'" title="Logout" class="loginlink">Log-out</a>'; } else { echo '<a href="'.wp_login_url( get_permalink() ).'" title="Login" class="loginlink">Log-in</a>'; } ?>