-
AuthorPosts
-
August 4, 2022 at 2:54 am #1360557
Hi!
I am using the Church theme template and just imported 100’s of posts from an other site. The post format transferred over which is nice but strangely when I look at a post that is clicked as Audio, the post is not showing the little audio visual that is normally seen within the featured image / grid view of the posts. I am attaching the way it looks on my site and the way it looks in the Church template.
Hopefully someone can tell me what’s going on?
Thanks,
GB
The church template look:
https://www.dropbox.com/s/31dnjkq7gst61rp/church_template.png?dl=0My imported Posts, you can see with the third post, the featured image is not there but you see that it is an Audio format post type:
https://www.dropbox.com/s/8kt253ixuple79g/my%20imported_posts.png?dl=0August 5, 2022 at 11:05 am #1360762Hey gb,
Thank you for the inquiry.
An audio format post has to contain an audio shortcode using mp3 for example.
[audio mp3="http://www.archive.org/download/music.mp3" preload="auto"][/audio]
This audio shortcode will display in the location of the featured image or post preview. Can you confirm that the imported posts contain audio shortcodes?
Best regards,
IsmaelAugust 5, 2022 at 5:22 pm #1360827Hi Ismael,
There are 700 posts imported from an other wordpress site and if I click on text view the audio code that brings up the player is:
[embed]https://suziesunshine.net/epostle/nextstep/NS738_072822.mp3[/embed]If I click on the player in visual mode and click edit the code viewed in the box is:
[audio src="https://suziesunshine.net/epostle/nextstep/NS738_072822.mp3" /]and below it in small letters is:
[audio src="https://suziesunshine.net/epostle/nextstep/NS738_072822.mp3" /]The podcast plays no problem, furthermore I thought the sound player visual shows up in the small view of the post when the audio is clicked as the format. I understood that that visual which defines what kind of post it is was controlled by choosing that format function of WordPress.
August 7, 2022 at 6:45 pm #1361006Gonna bump this up in case it got missed.
Looking to see if anyone understands why the audio symbol is not showing up on the grid view of imported posts that are format clicked as an audio post.
BTW – The audio link is in the post and works fine.
Example showing default theme function of an audio post:
https://www.dropbox.com/s/z45jzgunsg2gmjn/churchtheme.png?dl=0
Current look of my imported audio posts:
https://www.dropbox.com/s/lovpuvvr8908u7i/mysite.png?dl=0
- This reply was modified 2 years, 3 months ago by gb. Reason: added images for reference
August 8, 2022 at 3:54 am #1361038Hi,
Thank you for the info.
We may need to edit one of the posts in order to check the issue further. Please provide the login details in the private field.
In the enfold/includes/helper-post-format.php filter, you will find the avia_audio_content_filter function which handles the content and preview for audio formatted posts. The function requires an audio shortcode which it extracts from the post content based on a shortcode pattern. The extracted value is assigned as a parameter for the current post and passed as an argument for the avia_default_title_filter function, which is responsible for displaying the audio player in the preview container. Without the audio shortcode, the theme will not be able to display an audio player in the preview container.
Best regards,
IsmaelAugust 8, 2022 at 4:48 am #1361042Hi Ismael,
I am including the login info as requested in the private field.
Thanks!
GB
- This reply was modified 2 years, 3 months ago by gb.
August 10, 2022 at 12:30 pm #1361341Hi,
Thank you for the info.
As we have said earlier, the theme requires the audio shortcode in order to properly render an audio player inside the preview. To test this, we edited one of the audio posts titled Bee Dreams and replaced the embed shortcode with an audio shortcode.
[audio mp3="https://site.net/nextstep/another.mp3" preload="auto"][/audio]
In the Sermons page, you will see that the post preview now contains an audio player. (see private field)
Best regards,
IsmaelAugust 10, 2022 at 4:57 pm #1361368Thanks so much for figuring this out Ismael. So all the posts do have a shortcode like this:
[embed]https://suziesunshine.net/epostle/nextstep/NS735_070722.mp3[/embed]
I noticed for the post you got working the shortcode is like this:
[audio mp3="https://suziesunshine.net/epostle/nextstep/NS738_072822.mp3" preload="auto"][/audio]
Does this mean I will have to manually go thru all 700 posts and modify the code to read like yours to get it to render inside the preview?
Or might there be some kind of easier way?
Thanks again,
GBAugust 13, 2022 at 11:33 pm #1361626Hi,
Thanks for your patience, to correct all 700 posts I would use the Better Search Replace plugin, and search only tables for posts and make two search and replace runs, the first one would be:
[embed] ▸ [audio mp3="
and the second run would be:
[/embed] ▸ " preload="auto"][/audio]
I tested this on my demo site with one post having your embed code and it worked for me.
But for your situation, I would only do this if you are not using[embed]
for anything else, such as videos, and you have a backup of the posts or the original import file to revert the changes. Please be very careful with the the Better Search Replace plugin, it’s no joke! and there is no undo!
Another option if you are using[embed]
for videos, I would export your posts using the WordPress ▸ Tools ▸ Export ▸ posts option and edit it with VS Code or a similar text editor, here is the online version
Then remove all of the posts except for the audio ones, manually, then do the same search and replace as above, and then remove your audio posts from your site and use your modified import file to add them again. This would be a bit more work but still easier than editing 700 posts.Best regards,
Mike -
AuthorPosts
- The topic ‘Imported posts and the grid layout theme look has changed.’ is closed to new replies.