WordPress

Fixing source citations in WordPress

Jen Coates shared a link on 18 May 2017 to the group Australian Local & Family History Bloggers to the post Source Citation Trick for WordPress.com – HTML Code

Since I also use WordPress for my blog, and I sometimes (not often enough) include sources at the bottom of my posts, I thought it would be a good idea to set up links between the body of my posts and the sources.

I therefore tested this out in my latest post Surname Saturday – Kipp (Valentin Kipp).

To begin with, I kept getting the message “Page not found”. I then went in to HTML mode, and found that extra quotation marks had been added.

Instead of:

quotation marks

I was getting

quotation marks 2

Since I know a little bit about HTML, I decide to break down the links to the “a href” to create the link to the sources, and then the “a name” for the bookmark in the Sources.  I was able to confirm this was working in Preview mode.

I then went back and added the “name” section to the body, and the “a href” to the Source section, to create the link back to the body of the page.  To test these, I had to publish my post.

This was working fine.   I therefore needed to determine why it hadn’t worked properly in the first place.  I found the problem was the format of the quotation marks.

wrong quotation marks.PNG

I had copied the codes into Notepad, so that I could then copy the codes for the number of times I need them in my post, and then used Replace to change the numbers for each line.

It was therefore just a matter of going back into Notepad, and using Replace to change the quotation marks. I copied the first “wrong” quotation marks (the first one) and in “Replace With” I just used the keyboard to add the normal quotation marks.  Then I selected Replace All.

replace first

I then repeated the process for the quotation marks at the end, which face in the other direction

replace second.PNG

It may seem easier to copy and paste code, but in this instance it is better to either type the code out manually, or you can use the codes below – I have placed spaces before and after the brackets (< >) to stop the HTML code from executing. Just remove the spaces and the codes should work.

For the body of the post

< a href=”#_ftn1″ name=”_ftnref1″ >[1]< /a >

For the sources section

< a href=”#_ftnref1″ name=”_ftn1″ >[1]< /a >

2 thoughts on “Fixing source citations in WordPress”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s