Difference between revisions of "Timeline Express Pro Modifications"
(Created page with "Timeline Express Pro is a WordPress Plugin that presents information in a timeline format. They refer to the individual timeline items as "announcements", which are similar t...") |
m |
||
Line 3: | Line 3: | ||
That's the way it functions, and I used the features as they were to do something slightly different than what they had envisioned for their software. I used the custom "excerpt" as the main content of my timeline. I did this because I realized I could make each "announcement" its own self-contained webpage. And it worked great. But it also left another feature unneeded. That feature was the ability to display the full announcement. That wasn't something I needed because I was already displaying the full "announcement" with the Excerpt Add-On. | That's the way it functions, and I used the features as they were to do something slightly different than what they had envisioned for their software. I used the custom "excerpt" as the main content of my timeline. I did this because I realized I could make each "announcement" its own self-contained webpage. And it worked great. But it also left another feature unneeded. That feature was the ability to display the full announcement. That wasn't something I needed because I was already displaying the full "announcement" with the Excerpt Add-On. | ||
But then I came up with a use for it. The website I was developing was a biography that required sources to be cited. | But then I came up with a use for it. The website I was developing was a biography site that required sources to be cited. I changed the name of the link at the bottom of each timeline item to "Sources & Additional Information". The result was I could write the main content in the Excerpt Add-On section and do the citations in the "attachment" section, all on one screen. Perfect. Convenient and it displayed everything just like I wanted it to be. | ||
Everything was perfect until it came to SEO (Search Engine Optimization). The SEO Plugin I was using only provided a sitemap for the full "announcement", not the content of the Excerpt Add-On. That meant only the reference sections were cataloged by search engines, not the content that was displayed to users. I thought I could work around it by having the SEO Plugin create sitemaps for each of the webpages the timelines were on. That didn't work either because the SEO software couldn't "see" the individual items on a timeline. So a page containing several dozen images resulted in a sitemap that had ZERO images. Crap! | Everything was perfect until it came to SEO (Search Engine Optimization) that is. The SEO Plugin I was using only provided a sitemap for the full "announcement", not the content of the Excerpt Add-On. That meant only the reference sections were cataloged by search engines, not the content that was displayed to users. I thought I could work around it by having the SEO Plugin create sitemaps for each of the webpages the timelines were on. That didn't work either because the SEO software couldn't "see" the individual items on a timeline. So a page containing several dozen images resulted in a sitemap that had ZERO images. Crap! | ||
How to fix this? | |||
<br /> | |||
I had | === The Fix(es) === | ||
The first thing that needed to be done was to swap everything in the "announcement" section with the content in the Excerpt Add-On section. I wasn't about to do a copy past on that for several hundred entries. The solution to that was to swap column data in two database tables with each other. But as I read, mySQL (MariaDB) doesn't have that capability like other database servers do. for mySQL, it has to be done in stages. I read a bunch of stuff from people who were experts in SQL server. For my purposes it was way to complex. To stay within my abilities, I decided to create a couple of temporary tables and copy the data to them, and then copy from the temporary tables to the places I wanted to put the data. To make things even easier, I used phpMyAdmin. | |||
* First, backup the database: Select Database in phpMyAdmin, Export Tab, use defaults, Go and save to a location | |||
* During the above step I noticed that the database had the incorrect collation defined, so I changed it to the WordPress recommended utf8mb4_unicode_ci setting: Select Database in phpMyAdmin, Operations Tab, Collation Section | |||
* Create two temporary tables, TT1 and TT2 (as in Temporary Table 1 and 2): Select Database in phpMyAdmin, immediately under it select New, and create three columns with the following settings | |||
** TT1 (duplicating the necessary columns from the WordPress postmeta table); | |||
*** Name: post_id, Type: bigint(20) | |||
*** Name: meta_key, Type: varchar(255) | |||
*** Name: meta_value, Type: longtext | |||
** TT2 (duplicating the necessary columns from the WordPress posts table); | |||
*** Name: ID, Type: bigint(20) | |||
*** Name: post_type, Type: varchar(20) | |||
*** Name: post_content, Type: longtext | |||
OK, that solves the SEO issue because the sitemap now recognizes all the individual items and images because they also have their own individual URLs and "slugs". But what was displayed to users was now the citations instead of the content I wanted to display. That involved burrowing into the PHP code for the Add-On and making a small change. |
Revision as of 17:05, 7 February 2020
Timeline Express Pro is a WordPress Plugin that presents information in a timeline format. They refer to the individual timeline items as "announcements", which are similar to post or pages. By default, instead of displaying the full content of the "announcement" it displays an automatically generated "excerpt" (abbreviated version). By default this excerpt does not contain any HTML or ShortCode (only plain text). For people that do wish to display HTML in the "excerpts" they created an Add-On (Timeline Express HTML Excerpt Add On) that displays a custom "excerpt" of the timeline post which can include HTML content and ShortCode. Unfortunately this is a manual process. IE, the "excerpt" must be created and maintained separately from the main announcement.
That's the way it functions, and I used the features as they were to do something slightly different than what they had envisioned for their software. I used the custom "excerpt" as the main content of my timeline. I did this because I realized I could make each "announcement" its own self-contained webpage. And it worked great. But it also left another feature unneeded. That feature was the ability to display the full announcement. That wasn't something I needed because I was already displaying the full "announcement" with the Excerpt Add-On.
But then I came up with a use for it. The website I was developing was a biography site that required sources to be cited. I changed the name of the link at the bottom of each timeline item to "Sources & Additional Information". The result was I could write the main content in the Excerpt Add-On section and do the citations in the "attachment" section, all on one screen. Perfect. Convenient and it displayed everything just like I wanted it to be.
Everything was perfect until it came to SEO (Search Engine Optimization) that is. The SEO Plugin I was using only provided a sitemap for the full "announcement", not the content of the Excerpt Add-On. That meant only the reference sections were cataloged by search engines, not the content that was displayed to users. I thought I could work around it by having the SEO Plugin create sitemaps for each of the webpages the timelines were on. That didn't work either because the SEO software couldn't "see" the individual items on a timeline. So a page containing several dozen images resulted in a sitemap that had ZERO images. Crap!
How to fix this?
The Fix(es)
The first thing that needed to be done was to swap everything in the "announcement" section with the content in the Excerpt Add-On section. I wasn't about to do a copy past on that for several hundred entries. The solution to that was to swap column data in two database tables with each other. But as I read, mySQL (MariaDB) doesn't have that capability like other database servers do. for mySQL, it has to be done in stages. I read a bunch of stuff from people who were experts in SQL server. For my purposes it was way to complex. To stay within my abilities, I decided to create a couple of temporary tables and copy the data to them, and then copy from the temporary tables to the places I wanted to put the data. To make things even easier, I used phpMyAdmin.
- First, backup the database: Select Database in phpMyAdmin, Export Tab, use defaults, Go and save to a location
- During the above step I noticed that the database had the incorrect collation defined, so I changed it to the WordPress recommended utf8mb4_unicode_ci setting: Select Database in phpMyAdmin, Operations Tab, Collation Section
- Create two temporary tables, TT1 and TT2 (as in Temporary Table 1 and 2): Select Database in phpMyAdmin, immediately under it select New, and create three columns with the following settings
- TT1 (duplicating the necessary columns from the WordPress postmeta table);
- Name: post_id, Type: bigint(20)
- Name: meta_key, Type: varchar(255)
- Name: meta_value, Type: longtext
- TT2 (duplicating the necessary columns from the WordPress posts table);
- Name: ID, Type: bigint(20)
- Name: post_type, Type: varchar(20)
- Name: post_content, Type: longtext
- TT1 (duplicating the necessary columns from the WordPress postmeta table);
OK, that solves the SEO issue because the sitemap now recognizes all the individual items and images because they also have their own individual URLs and "slugs". But what was displayed to users was now the citations instead of the content I wanted to display. That involved burrowing into the PHP code for the Add-On and making a small change.