Skip Navigation

[Résolu] can not find correct post id.

This support ticket is created Il y a 7 années et 7 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 9 réponses, has 2 voix.

Last updated by Tia Il y a 7 années et 6 mois.

Assisted by: Tia.

Auteur
Publications
#440333

HI Guys,

Very simple issue, I created a CPT and exported it to a new site where I wanted to use it on as a module

All worked well except one hyperlink code. The page on original site is

hidden link

if you click on the business card logo it opens a profile page. The code is to open the profile page

<a href="[wpv-post-url id='325']?wpvcompany=[types field='company'][/types]">[types field='business-card' size='medium' align='none' resize='proportional'][/types]</a>

I am trying to replicate the identical issue on

hidden link

I know the issue why it is not opening the correct profile page is the 'id=325' .

Now I have not been able to find what that id on the original site refers so I cannot find what the id on the new site must be.

Any help would be appreciated

#440397

Tia
find-the-post-id.jpg

Thank you for contacting Toolset Support. I am happy to help you with this.

It's hard to tell without logging in but if you have the business cards as a custom post type, go to that area, hover or click on the entry and it should be located there as the value of "post=" (see screenshot)

If you still have troubles please let me know and ask me to enable the private box for the login.

#440690

Hi Tia,

This part of toolset alway stumps me. i have even gone so far as to reveal Id's yet no luck. if you could enable the private message option and i will give you the login credentials.

To save you some time the layout is very simple. I have one CPT called advertisers with various fields. The business card is an image field as part of the Advertiser's cpt. So the business cards when clicked must open the content template "advertisers profile" obviously with the relevant details relating to the business card.

In summary,

i have a cpt "advertisers" with various fields ranging from text to multiple images types.
One of the fields is "business cards" and this id then show on this page,
hidden link
and this is populated with this short code:
[wpv-view name="business-cards-filtered-by-category"]

It is this view that has the id that i quoted that is incorrect.

The template being referenced what running the code is "Advertisers Profile"

I will supply you with credentials for both site to be able to see exactly what i did.

#441095

Tia

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will request to duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://toolset.com/toolset-support-policy/privacy-security-providing-debug-information-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

#441710

Tia

Thank you for that information. I am looking into the issue and will respond shortly after investigating.

#442166

Tia

I think we have a few set up issues and I will like to duplicate the site for local testing.

Displaying Advertiser Fields

1. I created a new "Advertiser Single Listings" content template and assigned to the Advertisers CPT.

2. Looking at Baobab-web, you can see it is in fact using this content template.

3. Go to the frontend: hidden link You can see when viewing source the content template is indeed loading but for some reason not appearing on the page. I have disabled plugins and switched to a default WordPress theme. Still nothing.

Shortcode ID

The second issue is the shortcode ID.

Old code:

<a href="[wpv-post-url id='325']?wpvcompany=[types field='company'][/types]">[types field='business-card' size='medium' align='none' resize='proportional'][/types]</a>

What I recommend is linking to the post itself and assigning a content template to the advertiser type as I did above:

<a href="[wpv-post-url]">[types field='business-card' size='medium' align='none' resize='proportional'][/types]</a>

However, if you do still want to use the old code, the Content Template ID I created is 87:

<a href="[wpv-post-url id='87']&wpvcompany=[wpv-post-id]">[types field='business-card' size='medium' align='none' resize='proportional'][/types]</a>

To further debug why the content isn't showing I would like to replicate your site locally.

For this I will need to temporarily install a plugin called "Duplicator" (https://wordpress.org/plugins/duplicator/) on your site. This will allow me to create a copy of your site and your content.

Once the problem is resolved I will delete the local site.

Do I have your permission to move forward with Duplicator?

** IMPORTANT ** Please backup a working copy of site files and database before confirming.

#442494

Hi Tia,

You are more than welcome. I do appreciate your assistance!

#442699

Tia

Great, thank you. I will get the site duplicated and continue with local testing. I will have feedback for you as soon as possible.

#443137

Tia

Just a quick update to let you know I am still debugging on my end. Thank you for your patience.

#443542

Tia

I have good news. I was able to locate the issue. There is a native WordPress function being called: <?php post_class(); ?> that is causing the CSS class "advertiser" to be assigned to <article> and not allowing the HTML to show.

As a temporary workaround, I have added this CSS to the CSS Editor in Toolset:

#page article {
  display: inline-block !important;
}

Now the content shows:
hidden link

In addition to my recommendations earlier about how to link to the business card pages itself, I have also found the following:

- Settings > Permalinks:
Custom Structure - /index.php/%year%/%monthnum%/%day%/%postname%/
Recommened: switch to "Post name"
index.php is not necessary to keep in the URL and may cause issues in some plugins.

You may mark this thread as resolved. I will consult with my team about the post_class() function issue which has nothing to do with the theme you are using.

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