Skip to main content

Posts

Showing posts with the label WORDPRESS

HIGHLIGHT ADMIN COMMENTS IN WORDPRESS

If you receive a lot of comments on your wordpress site and you need a quick way for users to find replies from you, the admin. Then this snippet is perfect for you! Note: The image above is achieved with a bit more styling then in this snippet, but is easily achieved. This snippet simply styles the background color. How it works is simple, you specify a user id to add a custom class to. It then checks the user id of the user commentating. If the id matches then it will add the custom class to that comment. In this case we will use user id 1. Which is the main account that created the wordpress website. Read on to learn how… STEP 1: EDITING THE COMMENTS.PHP FILE In this step you need to open up comments.php from your theme folder. In this folder you need to find a line that looks like this: <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> Replace the above line with the following… <li class="<?php /* Only use the adminComment cla...

ENABLE WORDPRESS MULTI-SITE

Want to enable the new WordPress Multi-Site feature you have heard about and want to start your own WordPress network? It is very simple, just apply the following snippet. STEP 1: EDIT YOUR WP-CONFIG.PHP Open up wp-config.php in your preferred code editor and add the following code above where it says /* That’s all, stop editing! Happy blogging. */. If it doesn’t say that anywhere, then add the line somewhere above the first line that begins with require or include: define('WP_ALLOW_MULTISITE', true); What this will do is trigger the Multi-Site settings within WordPress Admin ready for you to set-up your Network. To do this simply refresh your browser, and click on your Tools menu in the Admin sidebar, you will see Network Setup underneath. There we have it, a very simple snippet for you. For more information on setting up your WordPress Multi-site Network please click here .