Skip Navigation

[Resolved] Adding content from other pages or posts to the layout

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user created a layout for a post but wanted to display some content from another post

Solution:

The solution is that each of our shortcodes for e.g [types field='some-field'][/types] allow for you to pass an ID into it.

So if the post that you want to display has an id of 4 then you can pass the ID 4 into the shortcode like this.
[types field='some-field' id='4'][/types] this will allow you to display the information from that post.

This support ticket is created 6 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 21 replies, has 3 voices.

Last updated by benH-6 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#579716

Hi Shane,

Yes, I'm building up to production in a few days, so I don't want anything out of control, so restricted access to all users for now.. As you say, according to your resolution changing the id would work, but I can assure you it totally doesn't! hence my reply. I tried various id numbers, but they all only showed content from id no.1. without fail. I could break the shortcode so it failed, but that was the only meaningful change I could achieve! As I said, I'm returning to using static content within the visual editor for now as I have a job here I need to complete.

Did you hear back from the developers re the problems with your first solution that affected the product archive loop? Was this a critical bug?

Perhaps moving forward from that is the best course for now.

Thanks for getting back to me,

Ben

#580020

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

So the main problem is that this is not replicable on a clean install so the issue is isolated to your website.

If i'm able to get a duplicator package from your site we can perform some more testing and to give a better result or solution.

Would you be able to open up the account so that I can install the duplicator plugin to clone the site ?

Thanks,
Shane

#580519
tooset-dashboard.png

Hi Shane,

Thanks for your reply,

Unfortunately I'm reluctant to make any changes to the site, or have the site data exported at this time, especially as it has woocomerce and other data within it. And am also a little wary after previous fixes failed. Whilst I have backups, I rally can't afford any hiccups right now.

However I have discovered a couple more anomalies though that perhaps might give a clue to the problem. I doubt you remember the site much, but the problem was occurring when trying to add content to the layout being used for woocommerce archive pages (shop and product categories etc). Recently I wanted to show the archive title at the top of each page, so I again tried to add it in a visual editor. It looked like it was working fine, but then I noticed Instead of showing the archive title (product category) of the page, it was actually showing the categories for the product at the top of the list, mostly this was the same thing, so seemed correct, but for some categories the topmost product some had two or more categories so the category would show two categories, but why would it be doing this? It is as if the page thinks it is a single product, not an archive.

Checking my Dash board I noticed there was a warning sign for woocommerce archive templates (I have to be honest I don't understand this bit too well!) picture attached. Could this be causing the issue? And if so how?

I was tempted to just click the "options" as detailed under the warning, and do as it suggested. But I'm a little fearful and don't understand the repercussions, or if this can be undone.

Also I remember when I created the layouts for the archive pages, I originally copied the single listing layout (to keep layout, sidebar attributes, css) and, after addding the woocomerce arhive loop into the layout, simply set the use of the layout to shop, archives, search etc. Was this incorrect?

Thanks again for your continued assistance,

Ben

#581266

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

I must apologize for the delay in response.

However we have released some new versions of our Plugins, could you try updating and let me know if the issue still remains ?

It could've been resolved in an update because this isn't replicable on a fresh install. If the problem still remains I would need the duplicator for our team to debug the issue.

Thanks,
Shane

#581509

Ok, so still no resolution on the very first query of adding content from another post, but I've resolved the category title issue I was having.

I was using [wpv-post-taxonomy type="product_cat" format="name"] to show the category title when I should have been using [wpv-taxonomy-archive info="name"]

I'm getting ready for site launch in a few days, so updating the plugins might have to wait, but I'll certinaly try that.

Regarding this. Once I have a production site up and running, how can I go about making a development site on the same server. Does toolset allow a cloned site to be worked on? How does this work with licensing etc? (I only have single site license) as this would be at a different location, albeit on the same domain. I could then share this with you in the future.

#582178

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ben,

The licensing is just for the automatic updates and seeing that you have a basic account you can only generate 1 key. So I would recommend using the key on the development environment to ensure that everything works fine and then update the production environment plugins manually.

Any word on if I can get a duplicator package for the site ? As this would be needed for our team to debug to see whats causing the issue as i'm not able to replicate the problem on a fresh install.

Thanks,
Shane

#585290

Ok, so I'll look at this more later, but it doesn't seem fair to keep you haning on, I won't get round to being able to make a site sitable for duplication for the next couple of weeks.

Interestingly I found that [wpv-post-body view_template="None" id="129"] works as expected within a page template, I'll experiment later within the woocommerce archive loop pages to see if I can overcome this.

Thanks for all your efforts Shane. I'll mark this as resolved even though it isn't quite and I'll post back if I do manage to resolve it in the future.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.