爱问 爱问共享资料 爱问分类
首页 > > > [Head.First.Wordpress.2010].Jeff.Siarto.文字版.pdf

[Head.First.Wordpress.2010].Jeff.Siarto.文字版.pdf

[Head.First.Wordpress.2010].Jef…

上传者: winxos
638次下载 0人收藏 暂无简介 简介 2012-01-07 举报

简介:Head.First.

AdvancePraiseforHeadFirstWordPress“TherearealotofWordPressbooksoutthere,butHeadFirstWordPressonceagainprovesthat[this]seriesisthegoldstandardforsmart,readable,easy-to-usereferenceguidesforcreativewebuserseverywhere.”—PaulAndrewsBlogger,author,andjournalist;editorofbikeintelligencer.com“ThisfriendlybookofferstipsthatIhaven’tseeninotherbooks,andfeaturesuseful,real-worldscenariostohelpgetyouuptospeedwiththelatestversionofWordPressquickly.”—JimDoranSoftwareengineeratJohnsHopkinsUniversity“AdministeringandmanagingaWordPressblogcanbedauntingfortheuninitiated.HeadFirstWordPresswalksyouthroughthebasicstohelpyourampupyourWordPresssitequickly.”—KenWalkerBusinessanalystPraiseforotherHeadFirstbooks“Buildingwebsiteshasdefinitelybecomemorethanjustwritingcode.HeadFirstWebDesignshowsyouwhatyouneedtoknowtogiveyourusersanappealingandsatisfyingexperience.AnothergreatHeadFirstbook!”—SarahCollingsUserexperiencesoftwareengineer“HeadFirstWebDesignreallydemystifiesthewebdesignprocessandmakesitpossibleforanywebprogrammertogiveitatry.Forawebdeveloperwhohasnottakenwebdesignclasses,HeadFirstWebDesignconfirmedandclarifiedalotoftheoryandbestpracticesthatseemtobejustassumedinthisindustry.”—AshleyDoughtySeniorwebdeveloper“IYHeadFirstHTMLwithCSS&XHTML—itteachesyoueverythingyouneedtolearnina‘fun-coated’format!”—SallyApplinUIdesignerandartist“TheWebwouldbeamuchbetterplaceifeveryHTMLauthorstartoffbyreadingHeadFirstHTMLwithCSS&XHTML.”—L.DavidBarronTechnicalLead,Layout&CSS,MozillaCorporation“HeadFirstHTMLwithCSS&XHTMLisathoroughlymodernintroductiontoforward-lookingpracticesinwebpagemarkupandpresentation.Itcorrectlyanticipatesreaders’puzzlementsandhandlesthemjustintime.Thehighlygraphicandincrementalapproachpreciselymimicsthebestwaytolearnthisstuff:makeasmallchangeandseeitinthebrowsertounderstandwhateachnewitemmeans.”—DannyGoodmanAuthorofDynamicHTML:TheDefinitiveGuide“Ohgreat,youmadeanXHTMLbooksimpleenoughaCEOcanunderstandit.Whatwillyoudonext?Accountingsimpleenoughmydevelopercanunderstandit?Nextthingyouknowwe’llbecollaboratingasateamorsomething.”—JaniceFraserCEO,AdaptivePathPraiseforotherHeadFirstbooks“BehindtheAjaxball?GetoutoftheshadowswithHeadFirstAjax.You’llwrapyourmindaroundthecoreconcepts,andhavesomefunintheprocess.”—BearBibeaultWebapplicationarchitect“Ajaxismorethanjustrevisitingexistingtechnologies,makingsomesmallchangestoyourwebapplicationandthendelcaringitAjax-enabled.RebeccaM.RiordanwalksyouthroughallofthestepsofbuildinganAjaxapplicationinHeadFirstAjax,andshowsyouthatAjaxismorethan‘thatlittleasynchronouspart’,butabetterapproachtowebdesignaltogether.”—AnthonyT.HoldenerIIIAuthorofAjax:TheDefinitiveGuide“HeadFirstDesignPatternsmanagestomixfun,bellylaughs,insight,technicaldepthandgreatpracticaladviceinoneentertainingandthought-provokingread.”—RichardHelmCoauthorofDesignPatterns“HeadFirstDesignPatternsisclosetoperfect,becauseofthewayitcombinesexpertiseandreadability.Itspeakswithauthorityanditreadsbeautifully.It’soneoftheveryfewsoftwarebooksI’veeverreadthatstrikesmeasindispensable.(I’dputmaybe10booksinthiscategory,attheoutside.)”—DavidGelernterProfessorofComputerScience,YaleUniversity“HeadFirstRailscontinuesthetraditionoftheHeadFirstseries,providinguseful,real-worldinformationtogetyouupandgoingquickly.[It]isanexcellentbookforpeoplelearningRails,aswellasthosebrushinguponthelatestfeatures.”—JeremyDurhamWebdeveloper“HeadFirstRailsisagreat,broadintroductiontoiterativeWeb2.0development.Thisbookwillshowyouhowquickandeasyitistodeveloprobust,next-generationwebsites.”—MattProudSystemsadministratoranddeveloperOtherrelatedbooksfromO’ReillyLearningWebDesignWebsiteOptimizationCSS:TheDefinitiveGuideCreatingaWebSite:TheMissingManualOtherbooksinO’Reilly’sHeadFirstseriesHeadFirstC#HeadFirstJavaHeadFirstObject-OrientedAnalysisandDesign(OOA&D)HeadFirstHTMLwithCSSandXHTMLHeadFirstDesignPatternsHeadFirstServletsandJSPHeadFirstEJBHeadFirstSQLHeadFirstSoftwareDevelopmentHeadFirstJavaScriptHeadFirstPhysicsHeadFirstStatisticsHeadFirstAjaxHeadFirstRailsHeadFirstAlgebraHeadFirstPHP&MySQLHeadFirstPMPHeadFirstWebDesignHeadFirstNetworkingBeijing•Cambridge•Kln•Sebastopol•Taipei•TokyoJeffSiartoHeadFirstWordPressWouldn’titbedreamyiftherewasabooktohelpmelearnhowtobuildWordPresssitesthatwasmorefunthangoingtothedentist?It’sprobablynothingbutafantasy…HeadFirstWordPressFirstEditionbyJeffSiartoCopyright2010JeffSiarto.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’ReillyMediabooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:(800)998-9938orcorporate@oreilly.com.SeriesCreators:KathySierra,BertBatesEditors:CourtneyNashCoverDesigner:KarenMontgomeryProductionEditors:KristenBorg,ScottDelugan,andRachelMonaghanIndexer:JulieHawksProofreader:NancyReinhardtPageViewers:HenryandRomulusPrintingHistory:July2010:FirstEdition.TheO’ReillylogoisaregisteredtrademarkofO’ReillyMedia,Inc.TheHeadFirstseriesdesignations,HeadFirstWordPress,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandtheauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedherein.Noblogswereharmedinthemakingofthisbook.ISBN:978-0-596-80628-6[M]Henry,Jeff’snephewRomulusToAllie,forputtingupwiththelatenightsandbusyweekends.Thiswouldnothavebeenpossiblewithoutyou.viiiJeffSiartoisauserexperienceandwebdesignercurrentlycallingChicagohome.HehastwodegreesfromMichiganStateUniversityandwasastudentofthestandards-basedwebdesignmovement—aspiringtothelikesofCederholm,Zeldman,andMeyer.Jeffisadie-hardcoworkerandhelpsorganizeJellyChicago,acoworkinggroupthatmeetstwiceaweekinChicago’sLincolnParkneighborhood.WhenJeffisn’tpushingpixels,heenjoyscookingandeating(OK,mostlyeating)andspendingtimewithhiswifeonChicago’swestsideandinMichiganwithfriendsandfamily.theauthorJeffixtableofcontentsTableofContents(Summary)Introxix1Gettingstarted:WordPressfromscratch12Changingyourblog’slookandfeel:Aquestionofstyle433ContentmanagementwithWordPress:Beyondtheblog894Users,categories,andtags:Keepingthingsorganized1315Videoandplug-ins:Gettingthingsmoving1676Podcastingandsyndication:Spreadingtheword1997SecuringWordPress:Lockingthingsdown2398MakingWordPressfast:Timeforthepassinglane273Leftovers:Thetoptenthings(wedidn’tcover)311TableofContents(therealthing)YourbrainonWordPress.Hereyouaretryingtolearnsomething,whilehereyourbrainisdoingyouafavorbymakingsurethelearningdoesn’tstick.Yourbrain’sthinking,“Betterleaveroomformoreimportantthings,likewhichwildanimalstoavoidandwhethernakedsnowboardingisabadidea.”SohowdoyoutrickyourbrainintothinkingthatyourlifedependsonknowingenoughtocreateyourownWordPresssite?IntroWhoisthisbookfor?xxWeknowwhatyou’rethinkingxxiMetacognition:thinkingaboutthinkingxxiiiHere’swhatYOUcandotobendyourbrainintosubmissionxxvReadmexxviThetechnicalreviewteamxxviiiAcknowledgmentsxxixxtableofcontentsWordPressfromscratch1You’vegotsomethingtosay.Whetherit’sjustyouandyourdesiretoleteveryoneknowaboutyourgrowingcollectionofhand-crochetedStarWarsfigures,orabigcompanywithhundredsofproducts,blogginglet’sanyonepublishonlinewithouthavingtobeageniusaboutHTML,CSS,oranyotherprogramming.Inthischapter,you’lllearnhowtogethostingforyourblog,installWordPress,andcreateandpublishyourfirstblogpost.gettingstartedWebpublishingforthemasses2HowWordPressworks:the30,000-footview3ThelifecycleofaWordPressblogpost4TheAcmeBitandPixelCompany6DownloadWordPress7The“famous”5-minuteWordPressInstall8UploadyourWordPressfilestothewebserver10FTPclientoptions11WordPressinstallationstep2:Configuration13WordPressstoresallyourstuffinadatabase14Createanewdatabasefromyourhostingpanel15Everyblogneedsatitle19PilotyourblogwiththeWordPressdashboard20Createyourfirstblogpost22Usebotheditorswhencreatingnewposts25UsePreviewtocheckyourpostbeforeyoupublish27Removeorreplacesamplepostsbeforeyougolive29Youdon’tneedPhotoshoptoeditanimage31Addanimageusingthemedialibrary33Updategrouppermissionstogetimageuploadsworking35Adjustingimageswithintheposteditor38Edityourposttomovethetextdownaline39WelcometotheBitBlog40YourWordPressToolbox41videos,imageshomepage.phpstyle.cssdatabasexitableofcontentsAquestionofstyleYou’vefinallygotyourownblog.Butitlooksso...generic.Timetomakeityourown.WordPresscomespreloadedwithlotsofthemesyoucanapplytoyourblog,butwe’regoingtogoonestepfurtherandmakeourowncustomtheme.Alongtheway,you’lllearnsomebasicHTMLandCSStoreallymakeyourbloglookexactlyhowyouwant.We’llalsodelveintoCSSrules,whichallowyoutoquicklychangehowyourbloglooks,andtakeadvantageofWordPresswidgetstoeasilyaddsidebarcontenttotheblog..changingyourblog’slookandfeelAtaleoftwosites44TheAcmeBitCompanyhomepage45AnatomyofaWordPresstheme51WordPressthemesareacollectionoftemplatefiles...52...allworkinginconcert53PHPisthelogicbehindyourtheme54Alwaysusethe.phpextensionforWordPressthemefiles56Createanewtheme60StylesheetsdictatethelookandfeelofpagesinWordPress62Rulesdoalotofworkforyou63WordPressusesstylesheetstwodifferentways65StylesheetsidentifyelementsinyourHTML70Puttingitalltogether71Everythinglooksgoodbutthesidebars76Updateyoursidebarcontentwithwidgets77Draganddropwidgetswhereyouwantthem78Onethemetorulethemall86YourWordPressToolbox872TemplateFilesUpClose#header{background:#ddd;height:50px;}#navul{float:right;margin:17px000;}xiitableofcontents3BeyondtheblogYou’restartingtooutgrowtheblog.Maybeyourbusinessisgrowing,maybeyouneedmorecontrolofwhatshowsupwhereonyourblog,andwhen.Luckily,WordPresshandlesalotmorethanjustchronologicalblogposts.We’llstarttotapintoitscontentmanagementsystemcapabilitiesbycreatingstaticpageslikeonaregularwebsite,addingnavigationforthenewpages,andchangingthehomepageofyournewsitesoitisn’tyourblog.Getreadytobuildafull-fledgedwebsitepracticallywithoutwritingasinglelineofHTMLorCSS.contentmanagementwithwordpressWordPressisacontentmanagementsystem92WordPresshasthreemainmanagementsections93WordPresspagesarejustposts“outside”theblog94PagesarethebackboneofyourCMS95Addinganewpageisjustlikeaddinganewpost96MakeyourURLsmanageablewithpermalinks100Permalinksarehandledbythewebserver101PageNotFound?102Mindingyour.htaccessfile103Buildyourpageswiththevisualeditor106Allpagesarenotcreatedequal112BuildnavigationusingtheWordPressmenusystem117Modifyyourthemetoenablethenavigationmenu119UseCSSrulestocontrolwhatshowsupinthemenu120WordPresshasdifferenthomepageoptions123Nomoreblog...Nomorehomepageeither?125AddHTMLtoyournewhomepagetemplatefile126ThenaddtheAcmesitestylerulestoyourCSSfile127YourWordPressToolbox129xiiitableofcontents4You’retheneweditorofThanksforMutton132WordPressuserroles134TheanatomyofaWordPressuser135Asampleuserprofile136Matchuserstotheirappropriateroles139Avoidchaoswithaneditorialworkflow141Reviewpendingpostsfromtheadmindashboard142Categoriesarebigbucketsforyourcontent144Categorieshelporganizeyourcontent145Contentiskeywhencreatingcategorystructures146Leftovercategoriesoftenmakegoodtags149Writerswanttheirpicturesnexttotheirposts154Gravatarmakesuserpictureseasy156Gravatarworkswithyouremailaddress159GravatarsupportsWordPresscommentsout-of-the-box160YourWordPressToolbox165KeepingthingsorganizedIt’stimetoinvitesomefriendstotheparty.Blogging(ormanagingaWordPresssite)doesn’thavetobeasolitaryventure.Loadsofwell-knowblogsouttherefeaturemultipleuserroles,fromwriterstoeditorsandadministrators.Inthischapter,you’lllearnhowtogetmultiplepeoplepostingonthesameblog,managetheworkflowacrossallthosepeople,andputcategoriesandtagstoworkinorganizingyoursite’scontent.users,categories,andtagsWeallusethesameloginbecauseit’seasy—youneverforgetthepassword!xivtableofcontents5GettingthingsmovingVideocanaddawholeotherdimensiontoyourblog.Fornearlyanykindofcontent,videomakesyoursitemoreengaging,andgivesyoureadersplentymoretocommentonandsharewiththeirfriends.Inthischapter,you’lllearnhowtohostyourvideosonlineandincludethem(alongwithotherdownloadablefiles)inyourblogposts.We’llintroduceplug-ins,whichdoalotofheavylifting(andcoding)foryou,andusecategoriestocreateaconsistent,easy-to-findhomeforallthevideosonyoursite.videoandplug-insAddingvideotoThanksforMutton168HostyourvideosoutsideWordPress169HostingwithVimeo170UploadyourvideotoVimeo172Plug-insmakeworkingwithotherwebserviceseasier178Findaplug-inforalmostanythinginthePlug-inDirectory179Browseandinstallplug-insfromwithinWordPress181Addadditionalcontentandfilestoyourpost188Usethemediagallerytoattachotherfiles189Usecategoriestocreateavideosection192Usethe“more”tagtocleanupyourhomepage195Plug-insUpClosexvtableofcontents6SpreadingthewordIt’stimemorepeopleknewaboutyourawesomesite.Yourblogishummingalong,andyou’vealreadyfiguredouthowtoexpandWordPresstomanageanentirewebsite.Nowthatyou’vegotvideoplayingtheretoo,whynotexpandyouraudiencebase?Inthischapter,we’lldiscoverhowtodistributevideosthroughApple’siTunesstoreaspodcasts,andhowtosyndicateyourcontentsothatatonmorepeoplewillfindoutaboutyoursite(andkeepcomingbackformore).podcastingandsyndicationTheThanksforMuttonpodcast200WordPressisyourhubforcontentdistribution201Theanatomyofapodcast202RSSisonewaytheWebsyndicatescontent203ThelifecycleofanRSSfeed204WordPresspublishesanRSSfeedautomatically208Vimeodoesn’tworkwellwithpodcasting211Where’sthevideo?215WordPressembedsitsownvideostoo216AddsomeinfotoyouriTunesfeed219Useaplug-intobuildaspecialfeedforiTunes220TSGPodcastingPlug-in221UsethePodcastingPlug-intoembedvideosforpodcasts224Feedburnergivesyoupodcaststats231Overridefeedsintheheaderofourtheme234WelcometotheThanksforMuttonpodcast236feed.xmlxvitableofcontents7LockingthingsdownNoteveryoneontheInternetisnice.It’safactofmodernlifeontheInternet:therearepeoplewhospendtheirtimetryingtobreakinto,orhack,otherpeople’swebsites.Somedoitjustforthethrill,otherstocausechaos,andsomearesimplyaftersensitiveinformationlikecreditcardnumbers,socialsecuritynumbers,andotherpersonalinformation.Now,you’lllearnhowtomakeyourWordPresssitemoresecure,withuniqueusernames,strongpasswords,andmore.You’llalsokickoffautomaticbackupsofallyourWordPressfilessoyoucanrestoreyoursiteifiteverdoesgethacked,orgoesdownforotherreasons.securingwordpressSomething’snotrighthere...240You’vebeenhacked242KeepyourWordPressinstallationandplug-insup-to-date244Avoidfileuploadswithautomaticupdates245UseFTPtoupdateWordPressifautomaticupdatesdon’twork246Secureusersmakesecurewebsites248Edityourdatabasetochangeusernames250Databasesaremadeupoftables251AddmoresecuritytoWordPressbyprotectingwp-admin255Createanewauthenticationrealm256Securitybyobscurity259Youcanlearnalotaboutasitebylookingatitshead261Backupearly,backupoften265Useplug-insforremote,automatedbackups267Don’tstorebackupsonyourwebserver268ConnectautomatedbackupstoAmazonS3269Restoringyourbackups269Importabacked-updatabaseusingphpMyAdmin270YourWordPressToolbox271xviitableofcontents8TimeforthepassinglanemakingwordpressfastNotagain...274KeepaneyeonyourtrafficwithGoogleAnalytics276IntegratingGoogleAnalyticswithWordPress277Yoursitetraffichasalottosay...278You’vebeenDugg279Theanatomyofawebpagerequest280WordPressperformancechecklist283SpeedupWordPresswithcaching284StartcachingwiththeWPSuperCachep

[Head.First.Wordpress.2010].Jeff.Siarto.文字版.pdf

[Head.First.Wordpress.2010].Jef…

上传者: winxos
638次下载 0人收藏 暂无简介 简介 2012-01-07 举报

简介:Head.First.

AdvancePraiseforHeadFirstWordPress“TherearealotofWordPressbooksoutthere,butHeadFirstWordPressonceagainprovesthat[this]seriesisthegoldstandardforsmart,readable,easy-to-usereferenceguidesforcreativewebuserseverywhere.”—PaulAndrewsBlogger,author,andjournalist;editorofbikeintelligencer.com“ThisfriendlybookofferstipsthatIhaven’tseeninotherbooks,andfeaturesuseful,real-worldscenariostohelpgetyouuptospeedwiththelatestversionofWordPressquickly.”—JimDoranSoftwareengineeratJohnsHopkinsUniversity“AdministeringandmanagingaWordPressblogcanbedauntingfortheuninitiated.HeadFirstWordPresswalksyouthroughthebasicstohelpyourampupyourWordPresssitequickly.”—KenWalkerBusinessanalystPraiseforotherHeadFirstbooks“Buildingwebsiteshasdefinitelybecomemorethanjustwritingcode.HeadFirstWebDesignshowsyouwhatyouneedtoknowtogiveyourusersanappealingandsatisfyingexperience.AnothergreatHeadFirstbook!”—SarahCollingsUserexperiencesoftwareengineer“HeadFirstWebDesignreallydemystifiesthewebdesignprocessandmakesitpossibleforanywebprogrammertogiveitatry.Forawebdeveloperwhohasnottakenwebdesignclasses,HeadFirstWebDesignconfirmedandclarifiedalotoftheoryandbestpracticesthatseemtobejustassumedinthisindustry.”—AshleyDoughtySeniorwebdeveloper“IYHeadFirstHTMLwithCSS&XHTML—itteachesyoueverythingyouneedtolearnina‘fun-coated’format!”—SallyApplinUIdesignerandartist“TheWebwouldbeamuchbetterplaceifeveryHTMLauthorstartoffbyreadingHeadFirstHTMLwithCSS&XHTML.”—L.DavidBarronTechnicalLead,Layout&CSS,MozillaCorporation“HeadFirstHTMLwithCSS&XHTMLisathoroughlymodernintroductiontoforward-lookingpracticesinwebpagemarkupandpresentation.Itcorrectlyanticipatesreaders’puzzlementsandhandlesthemjustintime.Thehighlygraphicandincrementalapproachpreciselymimicsthebestwaytolearnthisstuff:makeasmallchangeandseeitinthebrowsertounderstandwhateachnewitemmeans.”—DannyGoodmanAuthorofDynamicHTML:TheDefinitiveGuide“Ohgreat,youmadeanXHTMLbooksimpleenoughaCEOcanunderstandit.Whatwillyoudonext?Accountingsimpleenoughmydevelopercanunderstandit?Nextthingyouknowwe’llbecollaboratingasateamorsomething.”—JaniceFraserCEO,AdaptivePathPraiseforotherHeadFirstbooks“BehindtheAjaxball?GetoutoftheshadowswithHeadFirstAjax.You’llwrapyourmindaroundthecoreconcepts,andhavesomefunintheprocess.”—BearBibeaultWebapplicationarchitect“Ajaxismorethanjustrevisitingexistingtechnologies,makingsomesmallchangestoyourwebapplicationandthendelcaringitAjax-enabled.RebeccaM.RiordanwalksyouthroughallofthestepsofbuildinganAjaxapplicationinHeadFirstAjax,andshowsyouthatAjaxismorethan‘thatlittleasynchronouspart’,butabetterapproachtowebdesignaltogether.”—AnthonyT.HoldenerIIIAuthorofAjax:TheDefinitiveGuide“HeadFirstDesignPatternsmanagestomixfun,bellylaughs,insight,technicaldepthandgreatpracticaladviceinoneentertainingandthought-provokingread.”—RichardHelmCoauthorofDesignPatterns“HeadFirstDesignPatternsisclosetoperfect,becauseofthewayitcombinesexpertiseandreadability.Itspeakswithauthorityanditreadsbeautifully.It’soneoftheveryfewsoftwarebooksI’veeverreadthatstrikesmeasindispensable.(I’dputmaybe10booksinthiscategory,attheoutside.)”—DavidGelernterProfessorofComputerScience,YaleUniversity“HeadFirstRailscontinuesthetraditionoftheHeadFirstseries,providinguseful,real-worldinformationtogetyouupandgoingquickly.[It]isanexcellentbookforpeoplelearningRails,aswellasthosebrushinguponthelatestfeatures.”—JeremyDurhamWebdeveloper“HeadFirstRailsisagreat,broadintroductiontoiterativeWeb2.0development.Thisbookwillshowyouhowquickandeasyitistodeveloprobust,next-generationwebsites.”—MattProudSystemsadministratoranddeveloperOtherrelatedbooksfromO’ReillyLearningWebDesignWebsiteOptimizationCSS:TheDefinitiveGuideCreatingaWebSite:TheMissingManualOtherbooksinO’Reilly’sHeadFirstseriesHeadFirstC#HeadFirstJavaHeadFirstObject-OrientedAnalysisandDesign(OOA&D)HeadFirstHTMLwithCSSandXHTMLHeadFirstDesignPatternsHeadFirstServletsandJSPHeadFirstEJBHeadFirstSQLHeadFirstSoftwareDevelopmentHeadFirstJavaScriptHeadFirstPhysicsHeadFirstStatisticsHeadFirstAjaxHeadFirstRailsHeadFirstAlgebraHeadFirstPHP&MySQLHeadFirstPMPHeadFirstWebDesignHeadFirstNetworkingBeijing•Cambridge•Kln•Sebastopol•Taipei•TokyoJeffSiartoHeadFirstWordPressWouldn’titbedreamyiftherewasabooktohelpmelearnhowtobuildWordPresssitesthatwasmorefunthangoingtothedentist?It’sprobablynothingbutafantasy…HeadFirstWordPressFirstEditionbyJeffSiartoCopyright2010JeffSiarto.Allrightsreserved.PrintedintheUnitedStatesofAmerica.PublishedbyO’ReillyMedia,Inc.,1005GravensteinHighwayNorth,Sebastopol,CA95472.O’ReillyMediabooksmaybepurchasedforeducational,business,orsalespromotionaluse.Onlineeditionsarealsoavailableformosttitles(http://my.safaribooksonline.com).Formoreinformation,contactourcorporate/institutionalsalesdepartment:(800)998-9938orcorporate@oreilly.com.SeriesCreators:KathySierra,BertBatesEditors:CourtneyNashCoverDesigner:KarenMontgomeryProductionEditors:KristenBorg,ScottDelugan,andRachelMonaghanIndexer:JulieHawksProofreader:NancyReinhardtPageViewers:HenryandRomulusPrintingHistory:July2010:FirstEdition.TheO’ReillylogoisaregisteredtrademarkofO’ReillyMedia,Inc.TheHeadFirstseriesdesignations,HeadFirstWordPress,andrelatedtradedressaretrademarksofO’ReillyMedia,Inc.Manyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarks.Wherethosedesignationsappearinthisbook,andO’ReillyMedia,Inc.,wasawareofatrademarkclaim,thedesignationshavebeenprintedincapsorinitialcaps.Whileeveryprecautionhasbeentakeninthepreparationofthisbook,thepublisherandtheauthorassumenoresponsibilityforerrorsoromissions,orfordamagesresultingfromtheuseoftheinformationcontainedherein.Noblogswereharmedinthemakingofthisbook.ISBN:978-0-596-80628-6[M]Henry,Jeff’snephewRomulusToAllie,forputtingupwiththelatenightsandbusyweekends.Thiswouldnothavebeenpossiblewithoutyou.viiiJeffSiartoisauserexperienceandwebdesignercurrentlycallingChicagohome.HehastwodegreesfromMichiganStateUniversityandwasastudentofthestandards-basedwebdesignmovement—aspiringtothelikesofCederholm,Zeldman,andMeyer.Jeffisadie-hardcoworkerandhelpsorganizeJellyChicago,acoworkinggroupthatmeetstwiceaweekinChicago’sLincolnParkneighborhood.WhenJeffisn’tpushingpixels,heenjoyscookingandeating(OK,mostlyeating)andspendingtimewithhiswifeonChicago’swestsideandinMichiganwithfriendsandfamily.theauthorJeffixtableofcontentsTableofContents(Summary)Introxix1Gettingstarted:WordPressfromscratch12Changingyourblog’slookandfeel:Aquestionofstyle433ContentmanagementwithWordPress:Beyondtheblog894Users,categories,andtags:Keepingthingsorganized1315Videoandplug-ins:Gettingthingsmoving1676Podcastingandsyndication:Spreadingtheword1997SecuringWordPress:Lockingthingsdown2398MakingWordPressfast:Timeforthepassinglane273Leftovers:Thetoptenthings(wedidn’tcover)311TableofContents(therealthing)YourbrainonWordPress.Hereyouaretryingtolearnsomething,whilehereyourbrainisdoingyouafavorbymakingsurethelearningdoesn’tstick.Yourbrain’sthinking,“Betterleaveroomformoreimportantthings,likewhichwildanimalstoavoidandwhethernakedsnowboardingisabadidea.”SohowdoyoutrickyourbrainintothinkingthatyourlifedependsonknowingenoughtocreateyourownWordPresssite?IntroWhoisthisbookfor?xxWeknowwhatyou’rethinkingxxiMetacognition:thinkingaboutthinkingxxiiiHere’swhatYOUcandotobendyourbrainintosubmissionxxvReadmexxviThetechnicalreviewteamxxviiiAcknowledgmentsxxixxtableofcontentsWordPressfromscratch1You’vegotsomethingtosay.Whetherit’sjustyouandyourdesiretoleteveryoneknowaboutyourgrowingcollectionofhand-crochetedStarWarsfigures,orabigcompanywithhundredsofproducts,blogginglet’sanyonepublishonlinewithouthavingtobeageniusaboutHTML,CSS,oranyotherprogramming.Inthischapter,you’lllearnhowtogethostingforyourblog,installWordPress,andcreateandpublishyourfirstblogpost.gettingstartedWebpublishingforthemasses2HowWordPressworks:the30,000-footview3ThelifecycleofaWordPressblogpost4TheAcmeBitandPixelCompany6DownloadWordPress7The“famous”5-minuteWordPressInstall8UploadyourWordPressfilestothewebserver10FTPclientoptions11WordPressinstallationstep2:Configuration13WordPressstoresallyourstuffinadatabase14Createanewdatabasefromyourhostingpanel15Everyblogneedsatitle19PilotyourblogwiththeWordPressdashboard20Createyourfirstblogpost22Usebotheditorswhencreatingnewposts25UsePreviewtocheckyourpostbeforeyoupublish27Removeorreplacesamplepostsbeforeyougolive29Youdon’tneedPhotoshoptoeditanimage31Addanimageusingthemedialibrary33Updategrouppermissionstogetimageuploadsworking35Adjustingimageswithintheposteditor38Edityourposttomovethetextdownaline39WelcometotheBitBlog40YourWordPressToolbox41videos,imageshomepage.phpstyle.cssdatabasexitableofcontentsAquestionofstyleYou’vefinallygotyourownblog.Butitlooksso...generic.Timetomakeityourown.WordPresscomespreloadedwithlotsofthemesyoucanapplytoyourblog,butwe’regoingtogoonestepfurtherandmakeourowncustomtheme.Alongtheway,you’lllearnsomebasicHTMLandCSStoreallymakeyourbloglookexactlyhowyouwant.We’llalsodelveintoCSSrules,whichallowyoutoquicklychangehowyourbloglooks,andtakeadvantageofWordPresswidgetstoeasilyaddsidebarcontenttotheblog..changingyourblog’slookandfeelAtaleoftwosites44TheAcmeBitCompanyhomepage45AnatomyofaWordPresstheme51WordPressthemesareacollectionoftemplatefiles...52...allworkinginconcert53PHPisthelogicbehindyourtheme54Alwaysusethe.phpextensionforWordPressthemefiles56Createanewtheme60StylesheetsdictatethelookandfeelofpagesinWordPress62Rulesdoalotofworkforyou63WordPressusesstylesheetstwodifferentways65StylesheetsidentifyelementsinyourHTML70Puttingitalltogether71Everythinglooksgoodbutthesidebars76Updateyoursidebarcontentwithwidgets77Draganddropwidgetswhereyouwantthem78Onethemetorulethemall86YourWordPressToolbox872TemplateFilesUpClose#header{background:#ddd;height:50px;}#navul{float:right;margin:17px000;}xiitableofcontents3BeyondtheblogYou’restartingtooutgrowtheblog.Maybeyourbusinessisgrowing,maybeyouneedmorecontrolofwhatshowsupwhereonyourblog,andwhen.Luckily,WordPresshandlesalotmorethanjustchronologicalblogposts.We’llstarttotapintoitscontentmanagementsystemcapabilitiesbycreatingstaticpageslikeonaregularwebsite,addingnavigationforthenewpages,andchangingthehomepageofyournewsitesoitisn’tyourblog.Getreadytobuildafull-fledgedwebsitepracticallywithoutwritingasinglelineofHTMLorCSS.contentmanagementwithwordpressWordPressisacontentmanagementsystem92WordPresshasthreemainmanagementsections93WordPresspagesarejustposts“outside”theblog94PagesarethebackboneofyourCMS95Addinganewpageisjustlikeaddinganewpost96MakeyourURLsmanageablewithpermalinks100Permalinksarehandledbythewebserver101PageNotFound?102Mindingyour.htaccessfile103Buildyourpageswiththevisualeditor106Allpagesarenotcreatedequal112BuildnavigationusingtheWordPressmenusystem117Modifyyourthemetoenablethenavigationmenu119UseCSSrulestocontrolwhatshowsupinthemenu120WordPresshasdifferenthomepageoptions123Nomoreblog...Nomorehomepageeither?125AddHTMLtoyournewhomepagetemplatefile126ThenaddtheAcmesitestylerulestoyourCSSfile127YourWordPressToolbox129xiiitableofcontents4You’retheneweditorofThanksforMutton132WordPressuserroles134TheanatomyofaWordPressuser135Asampleuserprofile136Matchuserstotheirappropriateroles139Avoidchaoswithaneditorialworkflow141Reviewpendingpostsfromtheadmindashboard142Categoriesarebigbucketsforyourcontent144Categorieshelporganizeyourcontent145Contentiskeywhencreatingcategorystructures146Leftovercategoriesoftenmakegoodtags149Writerswanttheirpicturesnexttotheirposts154Gravatarmakesuserpictureseasy156Gravatarworkswithyouremailaddress159GravatarsupportsWordPresscommentsout-of-the-box160YourWordPressToolbox165KeepingthingsorganizedIt’stimetoinvitesomefriendstotheparty.Blogging(ormanagingaWordPresssite)doesn’thavetobeasolitaryventure.Loadsofwell-knowblogsouttherefeaturemultipleuserroles,fromwriterstoeditorsandadministrators.Inthischapter,you’lllearnhowtogetmultiplepeoplepostingonthesameblog,managetheworkflowacrossallthosepeople,andputcategoriesandtagstoworkinorganizingyoursite’scontent.users,categories,andtagsWeallusethesameloginbecauseit’seasy—youneverforgetthepassword!xivtableofcontents5GettingthingsmovingVideocanaddawholeotherdimensiontoyourblog.Fornearlyanykindofcontent,videomakesyoursitemoreengaging,andgivesyoureadersplentymoretocommentonandsharewiththeirfriends.Inthischapter,you’lllearnhowtohostyourvideosonlineandincludethem(alongwithotherdownloadablefiles)inyourblogposts.We’llintroduceplug-ins,whichdoalotofheavylifting(andcoding)foryou,andusecategoriestocreateaconsistent,easy-to-findhomeforallthevideosonyoursite.videoandplug-insAddingvideotoThanksforMutton168HostyourvideosoutsideWordPress169HostingwithVimeo170UploadyourvideotoVimeo172Plug-insmakeworkingwithotherwebserviceseasier178Findaplug-inforalmostanythinginthePlug-inDirectory179Browseandinstallplug-insfromwithinWordPress181Addadditionalcontentandfilestoyourpost188Usethemediagallerytoattachotherfiles189Usecategoriestocreateavideosection192Usethe“more”tagtocleanupyourhomepage195Plug-insUpClosexvtableofcontents6SpreadingthewordIt’stimemorepeopleknewaboutyourawesomesite.Yourblogishummingalong,andyou’vealreadyfiguredouthowtoexpandWordPresstomanageanentirewebsite.Nowthatyou’vegotvideoplayingtheretoo,whynotexpandyouraudiencebase?Inthischapter,we’lldiscoverhowtodistributevideosthroughApple’siTunesstoreaspodcasts,andhowtosyndicateyourcontentsothatatonmorepeoplewillfindoutaboutyoursite(andkeepcomingbackformore).podcastingandsyndicationTheThanksforMuttonpodcast200WordPressisyourhubforcontentdistribution201Theanatomyofapodcast202RSSisonewaytheWebsyndicatescontent203ThelifecycleofanRSSfeed204WordPresspublishesanRSSfeedautomatically208Vimeodoesn’tworkwellwithpodcasting211Where’sthevideo?215WordPressembedsitsownvideostoo216AddsomeinfotoyouriTunesfeed219Useaplug-intobuildaspecialfeedforiTunes220TSGPodcastingPlug-in221UsethePodcastingPlug-intoembedvideosforpodcasts224Feedburnergivesyoupodcaststats231Overridefeedsintheheaderofourtheme234WelcometotheThanksforMuttonpodcast236feed.xmlxvitableofcontents7LockingthingsdownNoteveryoneontheInternetisnice.It’safactofmodernlifeontheInternet:therearepeoplewhospendtheirtimetryingtobreakinto,orhack,otherpeople’swebsites.Somedoitjustforthethrill,otherstocausechaos,andsomearesimplyaftersensitiveinformationlikecreditcardnumbers,socialsecuritynumbers,andotherpersonalinformation.Now,you’lllearnhowtomakeyourWordPresssitemoresecure,withuniqueusernames,strongpasswords,andmore.You’llalsokickoffautomaticbackupsofallyourWordPressfilessoyoucanrestoreyoursiteifiteverdoesgethacked,orgoesdownforotherreasons.securingwordpressSomething’snotrighthere...240You’vebeenhacked242KeepyourWordPressinstallationandplug-insup-to-date244Avoidfileuploadswithautomaticupdates245UseFTPtoupdateWordPressifautomaticupdatesdon’twork246Secureusersmakesecurewebsites248Edityourdatabasetochangeusernames250Databasesaremadeupoftables251AddmoresecuritytoWordPressbyprotectingwp-admin255Createanewauthenticationrealm256Securitybyobscurity259Youcanlearnalotaboutasitebylookingatitshead261Backupearly,backupoften265Useplug-insforremote,automatedbackups267Don’tstorebackupsonyourwebserver268ConnectautomatedbackupstoAmazonS3269Restoringyourbackups269Importabacked-updatabaseusingphpMyAdmin270YourWordPressToolbox271xviitableofcontents8TimeforthepassinglanemakingwordpressfastNotagain...274KeepaneyeonyourtrafficwithGoogleAnalytics276IntegratingGoogleAnalyticswithWordPress277Yoursitetraffichasalottosay...278You’vebeenDugg279Theanatomyofawebpagerequest280WordPressperformancechecklist283SpeedupWordPresswithcaching284StartcachingwiththeWPSuperCachep
  • 相关资料
  • 该用户的其他资料
  • 名称/格式
  • 下载次数
  • 资料大小
  • 名称/格式
  • 下载次数
  • 资料大小

用户评论

0/200
暂无评论
上传我的资料
关闭

请选择举报的类型

关闭

提示

提交成功!

感谢您对爱问共享资料的支持,我们将尽快核实并处理您的举报信息。

关闭

提示

提交失败!

您的举报信息提交失败,请重试!

关闭

提示

重复举报!

亲爱的用户!感觉您对爱问共享资料的支持,请勿重复举报噢!

全屏 缩小 放大
收藏
资料评价:

/ 366
所需积分:0 立即下载
返回
顶部
举报
资料
关闭

温馨提示

感谢您对爱问共享资料的支持,精彩活动将尽快为您呈现,敬请期待!