Twansparant
Forum Replies Created
-
Ah okay, was wundering about that… No need to make a case against it ??
Thanks!There you go:
https://imageshack.us/f/801/schermafbeelding2012060.png/As you can see, below the search type fields, all the possible connections are allready visible. The Admin Boxes use a lot more space like this. I think this wasn’t like that in previous versions?
Thanks!
Yes, fixed! ?? Brilliant!
One thing I noticed though in this alpha version, is that in all the Admin boxes underneath the ‘search’ tab, all the posts are shown with navigation arrows. I believe those were only visible when you searched for something in the previous versions?
Thanks for your swift action!Sorry about that…
Here’s my code in pastebin
Thanks!Hi scribu,
What if you only want to display the Admin Box for a certain connection type on one specific page? How would I do that? Let’s say I want to connect a post from a certain post-type only from page with ID = 14.
My code does work, the box only shows up on the specific page, but when I try to connect a post, it doesn’t find any…
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Am I doing something wrong, or is it not possible yet with this function?
Many thanks as always!Forum: Fixing WordPress
In reply to: [Infinite-Scroll] [Plugin: Infinite-Scroll] Ajax-loader and moreI’m having exactly the same issue.
Did your loading image show up on your live site? Then it’s probably a bug for local sites only.In line 51 in infinitescroll.init.js.php:
$noscheme = parse_url(stripslashes($infscropts['infscr_image']));
I think the :8888 gets slashed off of the image urlThere is an issue with the plugin in WordPress 3.3.2:
https://www.ads-software.com/support/topic/plugin-p2p-wpml-error-when-adding-translationI made a bug rapport in the WPML forum too.
Many thanks for your help!
Same problem here!
These 2 plugins are one of my favourites and I use them a lot, so it would be very nice if this would get sorted out. I’m using WordPress 3.3.2, WPML Multilingual CMS 2.4.3, Posts 2 Posts 1.3.1 & Posts 2 Posts – WPML integration 1.0When I have both options enabled on the P2P WPML Settings page:
Synchronize connections between translations [x] Filter connectable items by current language [x]
Clicking on the translate button in the post edit page, as well from the posts overview page results in an 500 Internal Server Error.
When I disable the option:
Synchronize connections between translations [ ]
I can translate the posts and correctly connect the posts in both languages, but I obviously have to do it manually on the translated post.The option:
Filter connectable items by current language [x]
does seem to work though because in the translated language I can only connect the translated posts.Any ideas what causes the error?
Many thanks!No unfortunately not yet…
I have a workaround though to check if $scores returns an array, if not I use the normal the_related
https://pastebin.com/TSCn9aRRI allready addressed the issue to the plugin author here:
https://www.nicolaskuttler.com/wordpress-plugin/wordpress-related-posts-plugin/#comment-22566Forum: Fixing WordPress
In reply to: get page/post ID in functions.php fileThanks for this!
Does this also work when you have pretty permalinks or custom post types?
$url = explode('?', 'https://'.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]);
Cheers!Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Merging 2 connection arrays?Never mind, seconds after posting I realised it was the $post variable…
So I assigned a seperate variable to hold the original post id and used that one:
<?php $projectid = $post->ID; ?>
Thanks anyway!Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Merging 2 connection arrays?Hi scribu,
I have one more thing; after succesfully splitting the connected posts into domtab groups with p2p_split_posts, I want to display connected posts from a different connection type for the post_type ‘project’ only in the main loop.
Here’s my code: https://pastebin.com/9cfVuKxz
Everything works great, however the loop in the connected posts that also have a ‘artist-project’ connection stops after displaying:
<h4><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4>
And the one that don’t display correctly.
I think it might have something to do with the $post variable or resetting the query somehow?Any thoughts? Thanks!
Forum: Plugins
In reply to: [Posts 2 Posts] [Plugin: Posts 2 Posts] Merging 2 connection arrays?You’re brilliant! Thanks
Forum: Plugins
In reply to: [Plugin: Posts 2 Posts] Access values in connection field array?You are right again! ??
Somehow the ‘suppress_filters’ line was messing up my queries.
Thanks a lot!Forum: Plugins
In reply to: [Plugin: Posts 2 Posts] Access values in connection field array?Hi scribu,
After upgrading to the 1.1 plugin version, the p2p_split_posts doesn’t work anymore.
I addressed the issue over here and I put the function in my functions.php like you suggested.
The error Call to undefined function p2p_split_posts() is gone obviously, but the connected posts are not showing up anymore in my domtabs.
I use this code to get the connected posts and split the post types into domtabs:
$connected = p2p_type('event-participant')->get_connected( get_queried_object_id(), array( 'suppress_filters' => true, // necessary in combination with the sticky-custom-post-types plugin 'posts_per_page' => -1, 'orderby' => 'title', 'order' => 'ASC' ) ); $buckets = p2p_split_posts( $connected, 'participanttype' ); foreach ( $GLOBALS['participant_types'] as $type ) { if ( !isset( $buckets[$type] ) ) continue; $bucket = $buckets[$type]; echo '<li><a href="#'.$type.'">'.$type.'</a></li>'; } ?>
To populate the domtab div’s with the corresponding posts I’m using this code:
foreach ( $buckets as $type => $bucket ) { ?> <div class="tab"> <a name="<?php echo $type; ?>" id="<?php echo $type; ?>"></a> <?php foreach ( $bucket as $post ) { // Posts } ?> </div> <?php } ?>
I setup my connection type like this:
$GLOBALS['participant_types'] = array('value1', 'value2', 'value3', 'value4','value5'); p2p_register_connection_type( array( 'id' => 'event-participant', 'from' => 'fiber-event', 'to' => 'participant', 'sortable' => '_order', 'reciprocal' => true, 'prevent_duplicates' => false, 'title' => 'Event - Participant connection', 'fields' => array( 'project' => 'Project', 'featuredimage' => 'Attachement ID', 'participanttype' => array( 'title' => 'Type', 'values' => $GLOBALS['participant_types'] ) ), 'admin_box' => array('show' => 'any', 'context' => 'advanced') ) );
Any idea why it’s not working anymore?
When I downgrade to the 1.0.1 version, it works again?Thanks!