admin管理员组文章数量:1125443
I converted an old site, which used to run on a CMS called Smarty, to WordPress and am trying to make the look and feel of the site look like a proper music lyrics site.
There don't seem to be themes dedicated to this type of content. I have tried this theme, and while it looks to be just the right thing for the task, there is no ability to make it work with existing posts. It doesn't recognize my existing posts as lyrics, so basically nothing is functional. So I could enter existing posts into this theme one by one or run a complex database query to convert them, but neither is probably a good idea.
I did create a test new lyric with this theme, and these "lyrics" pages are, in fact, posts, but the URL appended to WordPress dashboard's URL is /wp-admin/post-new.php?post_type=lyrics. What does post_type=lyrics mean? I don't want to create a custom database that will not be readable by other themes if this one is discontinued and stops being compatible with future WordPres updates.
Should I find a theme that uses more standard nomenclature? Or is WordPress not a good engine for this task?
I converted an old site, which used to run on a CMS called Smarty, to WordPress and am trying to make the look and feel of the site look like a proper music lyrics site.
There don't seem to be themes dedicated to this type of content. I have tried this theme, and while it looks to be just the right thing for the task, there is no ability to make it work with existing posts. It doesn't recognize my existing posts as lyrics, so basically nothing is functional. So I could enter existing posts into this theme one by one or run a complex database query to convert them, but neither is probably a good idea.
I did create a test new lyric with this theme, and these "lyrics" pages are, in fact, posts, but the URL appended to WordPress dashboard's URL is /wp-admin/post-new.php?post_type=lyrics. What does post_type=lyrics mean? I don't want to create a custom database that will not be readable by other themes if this one is discontinued and stops being compatible with future WordPres updates.
Should I find a theme that uses more standard nomenclature? Or is WordPress not a good engine for this task?
Share Improve this question asked Jun 20, 2015 at 0:00 Matthew SMatthew S 1154 bronze badges3 Answers
Reset to default 1The theme is using a custom post type, in this case, "lyrics". Converting the old posts over to it should be as simple as writing a single query to update the old posts to the new post type.
The query will be something like:
UPDATE `wp_posts` SET post_type = "lyrics" WHERE post_type = "post";
Just as an added precaution, run this one first to ensure that all the posts you think should be converted will be affected and check the results:
SELECT * FROM wp_posts WHERE post_type = "post";
Some new lyrics website scripts, theme are available out there. They are made with Wordpress, it is way easier to manage because it seems that everybody knows how to use Wordpress.
Melyric | Song Lyrics Wordpress Theme https://www.lyricsphpscript.com/
Muusico - Song Lyrics WordPress Theme https://themeforest.net/item/muusico-song-lyrics-wordpress-theme/10964140?ref=PixWeber
Cheers
The theme is using custom post type and you are right to worry about using it. If you start using this theme, you are doomed in the sense that you can't change it later without breaking the site.
My personal opinion on theme is that it should only work on the visual aspect and leave the functionality part to the plugin. But so many themes break this rule and it is frustrating. Once you start using it, you are married to it for life. If you want to divorce, there are so much Alimony you have to pay that you will hardly think about it. In my opinion, it should be like a date rather than a marriage in the first place.
So, what's the best option for you?
First question, Do you really need custom post type? It depends on which functionality you want to incorporate. It's the question that you have to answer yourself. Personally, I believe it gives a lot of choice and I would've used it just for the fact that it separates my lyrics from post.
IMO for you the best option is to create a plugin that creates the custom post types for lyrics. Now the functionality is in the plugin and you can switch theme any time you want as long as the plugin is activated. You should give only a basic template in your plugin so that everything works without giving much visual consideration as it won't match with your theme anyway. Now in your theme, you need to create a template to display the custom post type properly. Every time you change a plugin, you will need to create a template so that it matches that theme style.
It means that you will still need to modify a little bit when you change theme to match everything perfectly, but even without it your site will work without failing to display the content. If coded properly, it might give nice view even without a template. And lastly modifying theme default template isn't going to take much time.
本文标签: custom post typesRunning a song lyrics site on WordPress
版权声明:本文标题:custom post types - Running a song lyrics site on WordPress 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736660351a1946384.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论