Complete group People page in one line!

Extending my work on pulling data into WordPress using short codes, I’ve made an entire ‘People’ page which can be displayed by typing just one short code into the page content area, an example is

[SDS_SYMBIOSIS  piid='dp1' data="researchGroupAccordion" uid="*" ]

where piid = the ID of the Principle Investigator (PI).  In this instance the PI is Dave Paterson (dp1), whose the group is called SERG.

If the PI has entered his research group into the School database, the above single line will make a complete research group ‘People’ page in WordPress entirely using data (and images) from School and PURE data.

See demo page.

It looks like SERG (whose site is in prep) will be the first to use this ‘live’.

Biologists: If you are authoring here at present, and want to see if your PI has entered their research group yet, visit the PI index, and click the ‘School’ link beside their name.  If there is a list like the one near the bottom right of this page, they’ve entered the group.  If not, ask your PI if they can do this, or send details of the list to me.

Research Group Lists – more content for less work

Combining research group lists from the School database, with the facilities I made earlier to allow data from School and Pure databases to be used, it is possible to populate a research group website with ‘people’ pages by making only two very short pages.

An example of this is shown below, for Dave Paterson, who had already made a list of his research group in the School database.

From a WordPress author’s point of view, the entire resource – the index, and all of the content for the people, required just two pages, and four short codes.  All content existed already in School of Pure databases.  Not bad…

Try example research group list, and researcher profile pages.

How to for PIs

Change image thumbnail crop

Suppose you have uploaded an image, and placed it on your page or post as a thumbnail, but you’ve found you don’t like the part of the image which WordPress has used to make the default 150×150 pixel thumbnail.  Here is how to change the thumbnail:

STEP 1: Sign in to your site dashboard and click Media to show the Media Library

STEP 2: Find the image you want to change, mouse over it, and click ‘Edit’

STEP 3: Click the ‘Edit Image’ button

STEP 4: IMPORTANT – select the Thumbnail radio button (near the middle of page)

STEP 5: click and drag in the image area to define a new region – best to make it a square area, as the thumbnails are by square default.  You can make sure it is square by typing numbers in the Selection boxes near the middle of the screen.

STEP 6: When you are satisfied, click the crop button top left: 

STEP 7: Click the SAVE button under the image

STEP 8: Click the UPDATE MEDIA button

STEP 9: repeat steps 2-8 if you wish to do other images at the same time.

STEP 10: go back to the page with the image thumbnail, delete the thumbnail you placed there previously, and add a new image – remember to use the image from the Media Library Tab, don’t re-upload it from your computer (if you do, you’ll be back to where you started!)

Using data from databases on your WordPress site…

I’ve been working to implement shortcodes which allow you to use data already stored on people in either our School database (called Symbiosis) or in the PURE database (aka research@st-andrews) to your WordPress research group site.

Shortcodes are simple codes enclosed in square brackets that you can type in your posts or pages which WordPress will convert into content when the post or page is viewed.  I’ve made some new codes that you can use.  For example, this code:

[SDS_SYMBIOSIS uid="sds" data="image" format="right"]

makes my image from the School database appear on the right of the page… (OK – I have even less hair now – time I put a new picture there, I know…)

You can find out more and see the full list of shortcodes on this post