Hi, so my client has uploaded/created 680 resource items that can be seen here lien caché using Toolset.
Now, they want these items shown as posts using the default categories and tags that WordPress offers, is there a way to export these resources into WP Posts, I just tried exporting them and importing but when I import, it just says the post already exists.
Thank you,
Daniel
Hi Daniel,
Thanks for asking! I'd be happy to help.
From your message, I understand that you'd like to convert the posts in "Resources" post type into the regular/default "Posts" post type.
If that is correct, you can simply change the post type for these posts using a plugin like "Post Type Switcher" ( https://wordpress.org/plugins/post-type-switcher/ ), as explained in this guide:
lien caché
I hope this helps and please let me know if you need any further assistance around this.
regards,
Waqar
Dear Waqar,
Thank you for the plugin, it is very quick. I am aware this is not your plugin and you are only trying to help.
I tried converting and the results are undesirable. Please view the attached or view the two links for comparison. The body of the post and other elements such as download button and such are missing, is there any other way you might be aware of that is better than this.
Before conversion: lien caché
After conversion: lien caché
Thank you,
Daniel
Hi Daniel,
Thanks for writing back and sharing the update.
The difference in how the converted posts show on the front-end is most likely related to the difference in the assigned content template.
Can you please open the edit screens of both these posts from your last message and see if the same "Content Template" is assigned to both of them?
( example screenshot: lien caché )
I suspect that those newly converted posts at the moment have no or different content template assigned, as compared to the already existing posts. Setting the same content template should make them show the same layout/content.
Please let me know how it goes and you're welcome to share temporary admin login details of both these websites if you'd like me to take a look in the admin area.
Note: Your next reply will be private and please make a complete backup copy, before sharing the access details.
regards,
Waqar
Hi Daniel,
Thank you for sharing the admin access.
The way content presentation is designed on the website, it shows only the "Resources" type posts in a certain way.
For example, if you'll check the "single-resource.php" file in the active theme's folder, you'll see that it is set to show the post's content using the "[wpv-post-body view_template="None"]" shortcode and view "Resources - Resource Media" through the "render_view" function.
( screenshot: lien caché )
The file "single-resource.php" will be used for the single "Resources" type post pages only, but if you'd like your single "Posts" pages, to also use the same layout, you can copy the contents of this file "single-resource.php" into the file "single.php".
( the "single.php" file controls the output of single "Posts" pages ).
Additionally, the theme also applies certain CSS styles like the border around the download link to the single "Resources" type post pages only, by including the ".single-resource" class name. You'll have to add those CSS styles to single post pages too.
Tip: To check which CSS code is applying to different page elements, you can use Google Chrome's inspect element tool, as explained in this guide:
lien caché
regards,
Waqar
Dear Waqar,
Thank you for the advise, I managed to do it, however, the styles do not show up and I have been trying to figure this out, your support has been amazing. Can you please take a look and see if you can find the reason for this, I am specifically talking about the button and the style not being applied.
Thank you,
Daniel
Hello,
Waqas is on vacation, I will take care this ticket.
I can login your website, but I am not sure where I can check.
Please point out the problem page URL, and which button should I check, thanks
Please see the live site, this resource is before it was converted to a post lien caché
Please see staging where we had converted and also applied the CSS styling but the download button does not reflect. lien caché
Kindly go through the above conversation to get an idea of what Waqar has been assisting with.
Thanks for the details, I have done below modifications in your website:
Edit post view "Resources - Resource Media":
lien caché
In section "Loop Editor", click "CSS Editor", add below CSS codes:
.resource-btn {
float: left;
padding: 3px 10px;
border-right: 1px solid #4d9e2d;
border-top: 1px solid #4d9e2d;
border-bottom: none;
font-weight: bold;
text-transform: uppercase;
font-size: 0.9em;
border-left: 1px solid #4d9e2d;
}
.resource-media {
border-bottom: 1px solid #4d9e2d;
margin-top: .5em;
}
Please test again, check if it is fixed, thanks
My issue is resolved now. Thank you!