Home › Forums › Welcome! › Pre-Sales Questions › 'post_type' => 'post'
- This topic has 4 replies, 1 voice, and was last updated 9 years, 2 months ago by Barry.
-
AuthorPosts
-
February 17, 2015 at 4:08 am #942965GillesGuest
Hi,
i’m am using The Event Calendar and before paying the Pro licence i’ve just a case to be cleared..
When i setup an event (new or update one) i had some custom fields like Facebook link, website link, twitter link… and a custom fiel idCategory to be able to join an event to the posts wich are in the idCategory.
That is to say, when i’m looking an event; i want to have the last posts speaking about the event.I’ve wrote this code
if ($custom[‘idCategory’][0]) {
$args = array( ‘post_type’ => ‘post’,’posts_per_page’ => 10, ‘cat’ => $custom[‘idCategory’][0] );
$my_query = new wp_query($args);
if( $my_query->have_posts() ) { echo ”; while ($my_query->have_posts()) { $my_query->the_post();
SHOW POST
}The trouble is that, even if $custom[‘idCategory’][0] return the good idCategory, wp_query returns no row and in fact the query is looking for post_type= TribeEvents !
there is nearly the same issu as in my website, on right side i have a widget calling the last-randomize-maxview posts
look right here
http://www.adonnante.com/calendrier/When i am in an event page
http://www.adonnante.com/epreuve/extreme-sailing-series-2015-acte-2-mascate-oman-11-14-mars/
the right last-randomize-bestviuw posts show EVENTS and no POST !!!!The two issues are the same i think, but i don’t find the way to corrected them.
Thanks for your help.
Regards
Gilles
February 17, 2015 at 4:50 am #942973GillesGuestto go further
for my request
$args = array( ‘post_type’ => ‘post’,’posts_per_page’ => 10, ‘cat’ => $custom[‘idCategory’][0] );
$my_query = new wp_query($args);if i do a print_r($my_query) I have this
WP_Query Object ( [query_vars] => Array ( [post_type] => tribe_events [posts_per_page] => 10 [cat] => 1877 [error] => [m] => [p] => 0 [post_parent] => [subpost] => [subpost_id] => [attachment] => [attachment_id] => 0 [name] => [static] => [pagename] => [page_id] => 0 [second] => [minute] => [hour] => [day] => 0……
Notice the post_type wich is now tribe_events …
February 17, 2015 at 6:54 am #943025BarryMemberHi Gilles,
It’s great to hear you’re thinking of purchasing a license – besides providing you with access to Events Calendar PRO and our official support forums it is a fantastic way to support the project 🙂
Here on the pre-sales forum, though, I’m afraid we do not provide technical support. Once you have a license you will certainly be welcome to post on our PRO forum, but until that point I would ask that you take any technical support questions across to our wordpress.org forum – our staff scan it periodically and other community members may also be able to help out.
Thanks again!
February 17, 2015 at 7:07 am #943030GillesGuestThanks,
i’ll have a look to the WP Forum…
I just want to be sure that this issues will find a solution before buying the Pro version to have the phot and map views option on my calendar
Regards
Gilles
February 17, 2015 at 7:50 am #943057BarryMemberI can definitely appreciate that and if you go ahead and post on our wordpress.org forum that is probably the best course of action (at least until you purchase a license and can take advantage of our PRO forums).
Thanks again 🙂
-
AuthorPosts
- The topic ‘'post_type' => 'post'’ is closed to new replies.