Archived; click post to view. Excerpt: Sometimes we have a need to highlight the first post in loop of main page, archive page or search page and apply different style for it. This output can be implemented by using special CSS class and simple php code. Originally we have the regular loop to output our […]
Code for inserting your own content to every RSS Feed of WordPress based blog is very simple It can be usefull for inserting ads or banners. Include the code must in functions.php of your theme.
If for some reasons we have to exclude one or several categories from RSS, it can be done this way. Insert into functions.php next code.
We might have a situation, when we need to display the excerpt with the fixed number of world. To achieve that, create the next function in functions.php of the current theme:
Let’s imagine we have to replace in all posts of wordpress the chunk of text at once, or highlite the word, or put the link, etc. To edit every post might take a long time. There is an elegant and simple solution to achieve the task.
Archived; click post to view. Excerpt: As you know the number of installed plugins affects the loading blog time. To display most commented posts without any plugin insert next code into template files (index.php, sidebar.php and so on.) 5 in line 2 is number of links displayed! Another Way Next code looks more elegant. <?php […]
To deactivate the unneccessary default WordPress Widgets just insert next code in your functions.php file of your current theme. The following code should be adjusted depending on your needs;
To remove automatic links of urls in comments, simply open your functions.php file and paste the following code: Now you can say bye to to spammy links in comments.
Sometimes doing the css layout, we need to assign the specific class name to the body tag. To achieve the task, the only thing you have to do is to copy the following code and paste it on your theme functions.php file. Once saved, the post/page name will be automatically be added to the body […]