Category Archives: Wordpress Tips

WordPress Tip — Finding your DB name

0
Filed under Uncategorized, Web Design, Wordpress Tips

I was look­ing through my Cpanel recently to find a DB name for a par­tic­u­lar blog. I have installed sev­eral blogs and there are many other MySql nec­es­sary sites / Data­bases.   So when going into MyPh­pAd­min to do any type of work, one really should be sure of the DB you need to work on.   How do you find it?

For Word press and many other types of php scripts you can look for the Con­fig php file. Inside of your work­ing direc­tory where Word­Press is installed for exam­ple you will want to find the file named:

wp-config.php

open this file:

look for the line of code that looks sim­i­lar to this :

define(‘DB_NAME’, ‘*******’);

‘*******’ What ever is in between the ’ ’ marks is your Data­base name.   Usu­ally this for­mat: username_DBname Where DB name is what you will see in PHP­myAd­min. You can then do your mod­i­fi­ca­tion — change pass­words , etc..

Incom­ing search terms:

How to set up the visual rich editor in wordpress

0
Filed under Wordpress Tips

I often have to set up blogs or use Word Press as a CMS .  I have some pref­er­en­tial set­tings I like to use.   One of them is to have the but­tons for text edit­ing avail­able like using BOLD Under­lined Text or Ital­i­ciz­ing text.

I started writ­ing these tuto­ri­als so that I would have a quick ref­er­ence to re-setting up a blog and con­fig­ur­ing a new one for Word­Press. Word­Press is a great plat­form but lit­tle items like this can make it a bit frus­trat­ing to use at times. There should prob­a­bly be a more user friendly way of tick­ing this set­ting on but no such luck. My research has turned this up:

There is a set­ting under users on the Word­Press Con­trol panel.   For ver­sion 2.9  it says:   Your Pro­file

I clicked it.  On the page a check box at the top by default  was ticked  that said  dis­able the rich text edi­tor.    So I unchecked it and now all of the icons for rich text edit­ing have reappeared.

I spent way too much time look­ing for this set­ting.   I wont have to go far if I for­get it the future.


Incom­ing search terms:

How to limit post length on your homepage

0
Filed under Wordpress Tips

I just needed to set this up for myself so why not write a brief tuto­r­ial so I will remem­ber. I orig­i­nally found this at here

I am repeat­ing this infor­ma­tion since I often have to do the same thing on other blogs for clients and such and to fur­ther explain some points I messed up on via the original.

In essence to repeat what was said the code below will go into the functions.php of your indi­vid­ual theme. Uti­liz­ing CODA i log in to my server and open this fold­ers path: blog > wp-content > themes > your theme name >functions.php . Within functions.php , I just cre­ated a space among the other func­tions and pasted the code below and saved the file — do not close the file as you may need to return to the orig­i­nal state (note that there is a com­ment added that is dif­fer­ent form the original):


// TO LIMIT WordPress Post length on homepage
function string_limit_words($string, $word_limit)
{
$words = explode(' ', $string, ($word_limit + 1));
if(count($words) > $word_limit)
array_pop($words);
return implode(' ', $words);
}

Now In the same folder within your them locate index.php and replace the line :

with :


< ?php $excerpt = get_the_excerpt(); echo string_limit_words($excerpt,40); ?>

I orig­i­nally tried to just replace the the words : the_content with all of the other code. Now after a cou­ple of tries I slapped my head got it. Not too tough really, and it works very well.

Incom­ing search terms:

Bad Behavior has blocked 3 access attempts in the last 7 days.