Forum Replies Created

Viewing 15 replies - 16 through 30 (of 41 total)
  • Thread Starter Marlon Amancio

    (@marlonlamancio)

    Never mind. I deleted the plugin folder and did worked.

    Are you a SiteGround host client?

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Thanks, I’ll try to notify them.

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Thank you Aristeides for you attention and fast reply!!

    Best regards!

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    @tjmcd1963 I even put [resolved] because it is not a serious problem

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Yes, when i put some string the warning stops.

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Maybe this is because there isn’t ewww_image_optimizer_aux_paths options filled.

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Thank you Aaron!

    Hi all,

    I’ve just installed now, I had never used it, and does not working.

    Plugin looks like great, looking forward to use it.

    Regards

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Scribu,

    I think I noticed something, within WP_Query object the value of key post_type in query_vars array is projeto, should not be attachment in this case?

    Thank you!

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Did not worked, any other thoughts?

    Thanks for you attention Scribu.

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    Sorry my mistake, I had configured the connection type wrongly, the correct is:

    p2p_register_connection_type( array(
    'name' => 'parceiro_to_projeto',
    'from' => 'attachment',
    'to' => 'projeto'
    ) );

    After correcting I could create connections =D

    But now I’m not getting the related attachments when query it in single projeto template:

    $parceiros = new WP_Query( array(
    'connected_type' => 'parceiro_to_projeto',
    'connected_items' => get_queried_object(),
    ) );

    I trie this too:

    $parceiros = new WP_Query( array(
    'post_type' => 'attachment',
    'connected_type' => 'parceiro_to_projeto',
    'connected_items' => get_queried_object(),
    'connected_direction' => 'to',
    'nopaging' => true,
    ) );

    When I print_r($parceiros) the object doesn’t hold the related attachments.

    WP_Query Object
    (
        [query_vars] => Array
            (
                [post_type] => Array
                    (
                        [0] => projeto
                    )
    
                [connected_items] => stdClass Object
                    (
                        [ID] => 14
                        [post_author] => 2
                        [post_date] => 2012-06-19 18:43:47
                        [post_date_gmt] => 2012-06-19 21:43:47
                        [post_content] => Para confirmar o Show de lan?amento do novo CD da Pequena Morte, precisamos arrecadar R$5.000, divididos em 200 ingressos reembolsáveis (R$ 25 cada). Com o show confirmado, a venda de ingressos normais (R$ 40 Inteira e R$20 Meia) come?a. Com a venda de 300, os Variantes recebem reembolso integral e assistem ao show de gra?a.
    
    Temos até o final do dia 25/06, Quinta-Feira, para confirmar a presen?a do Pequena Morte no Chevrolet Hall.
                        [post_title] => Lan?amento do CD da Pequena Morte
                        [post_excerpt] =>
                        [post_status] => publish
                        [comment_status] => open
                        [ping_status] => closed
                        [post_password] =>
                        [post_name] => lancamento-cd-pequena-morte
                        [to_ping] =>
                        [pinged] =>
                        [post_modified] => 2012-08-27 18:27:46
                        [post_modified_gmt] => 2012-08-27 21:27:46
                        [post_content_filtered] =>
                        [post_parent] => 0
                        [guid] => https://variavel5.wpengine.com/?post_type=projeto&p=14
                        [menu_order] => 0
                        [post_type] => projeto
                        [post_mime_type] =>
                        [comment_count] => 0
                        [ancestors] => Array
                            (
                            )
    
                        [filter] => raw
                    )
    
                [nopaging] => 1
                [error] =>
                [m] => 0
                [p] => 0
                [post_parent] =>
                [subpost] =>
                [subpost_id] =>
                [attachment] =>
                [attachment_id] => 0
                [name] =>
                [static] =>
                [pagename] =>
                [page_id] => 0
                [second] =>
                [minute] =>
                [hour] =>
                [day] => 0
                [monthnum] => 0
                [year] => 0
                [w] => 0
                [category_name] =>
                [tag] =>
                [cat] =>
                [tag_id] =>
                [author_name] =>
                [feed] =>
                [tb] =>
                [paged] => 0
                [comments_popup] =>
                [meta_key] =>
                [meta_value] =>
                [preview] =>
                [s] =>
                [sentence] =>
                [fields] =>
                [category__in] => Array
                    (
                    )
    
                [category__not_in] => Array
                    (
                    )
    
                [category__and] => Array
                    (
                    )
    
                [post__in] => Array
                    (
                    )
    
                [post__not_in] => Array
                    (
                    )
    
                [tag__in] => Array
                    (
                    )
    
                [tag__not_in] => Array
                    (
                    )
    
                [tag__and] => Array
                    (
                    )
    
                [tag_slug__in] => Array
                    (
                    )
    
                [tag_slug__and] => Array
                    (
                    )
    
                [connected_meta] => Array
                    (
                    )
    
                [suppress_filters] =>
                [ignore_sticky_posts] => 1
                [cache_results] =>
                [update_post_term_cache] => 1
                [update_post_meta_cache] => 1
                [posts_per_page] => 10
                [comments_per_page] => 50
                [no_found_rows] =>
                [order] => DESC
            )
    
        [tax_query] => WP_Tax_Query Object
            (
                [queries] => Array
                    (
                    )
    
                [relation] => AND
            )
    
        [meta_query] => WP_Meta_Query Object
            (
                [queries] => Array
                    (
                    )
    
                [relation] =>
            )
    
        [post_count] => 0
        [current_post] => -1
        [in_the_loop] =>
        [comment_count] => 0
        [current_comment] => -1
        [found_posts] => 0
        [max_num_pages] => 0
        [max_num_comment_pages] => 0
        [is_single] =>
        [is_preview] =>
        [is_page] =>
        [is_archive] => 1
        [is_date] =>
        [is_year] =>
        [is_month] =>
        [is_day] =>
        [is_time] =>
        [is_author] =>
        [is_category] =>
        [is_tag] =>
        [is_tax] =>
        [is_search] =>
        [is_feed] =>
        [is_comment_feed] =>
        [is_trackback] =>
        [is_home] =>
        [is_404] =>
        [is_comments_popup] =>
        [is_paged] =>
        [is_admin] =>
        [is_attachment] =>
        [is_singular] =>
        [is_robots] =>
        [is_posts_page] =>
        [is_post_type_archive] =>
        [query_vars_hash] => ff5b6b55328efdb43f132462317bca7d
        [query_vars_changed] => 1
        [thumbnails_cached] =>
        [query] => Array
            (
                [post_type] => attachment
                [connected_type] => parceiro_to_projeto
                [connected_items] => stdClass Object
                    (
                        [ID] => 14
                        [post_author] => 2
                        [post_date] => 2012-06-19 18:43:47
                        [post_date_gmt] => 2012-06-19 21:43:47
                        [post_content] => Para confirmar o Show de lan?amento do novo CD da Pequena Morte, precisamos arrecadar R$5.000, divididos em 200 ingressos reembolsáveis (R$ 25 cada). Com o show confirmado, a venda de ingressos normais (R$ 40 Inteira e R$20 Meia) come?a. Com a venda de 300, os Variantes recebem reembolso integral e assistem ao show de gra?a.
    
    Temos até o final do dia 25/06, Quinta-Feira, para confirmar a presen?a do Pequena Morte no Chevrolet Hall.
                        [post_title] => Lan?amento do CD da Pequena Morte
                        [post_excerpt] =>
                        [post_status] => publish
                        [comment_status] => open
                        [ping_status] => closed
                        [post_password] =>
                        [post_name] => lancamento-cd-pequena-morte
                        [to_ping] =>
                        [pinged] =>
                        [post_modified] => 2012-08-27 18:27:46
                        [post_modified_gmt] => 2012-08-27 21:27:46
                        [post_content_filtered] =>
                        [post_parent] => 0
                        [guid] => https://variavel5.wpengine.com/?post_type=projeto&p=14
                        [menu_order] => 0
                        [post_type] => projeto
                        [post_mime_type] =>
                        [comment_count] => 0
                        [ancestors] => Array
                            (
                            )
    
                        [filter] => raw
                    )
    
                [connected_direction] => to
                [nopaging] => 1
            )
    
        [_p2p_query] => P2P_Query Object
            (
                [ctypes:protected] => Array
                    (
                        [0] => P2P_Directed_Connection_Type Object
                            (
                                [ctype:protected] => P2P_Connection_Type Object
                                    (
                                        [indeterminate] =>
                                        [object] => Array
                                            (
                                                [from] => post
                                                [to] => attachment
                                            )
    
                                        [side] => Array
                                            (
                                                [from] => P2P_Side_Post Object
                                                    (
                                                        [item_type:protected] => P2P_Item_Post
                                                        [query_vars] => Array
                                                            (
                                                                [post_type] => Array
                                                                    (
                                                                        [0] => projeto
                                                                    )
    
                                                            )
    
                                                    )
    
                                                [to] => P2P_Side_Attachment Object
                                                    (
                                                        [item_type:protected] => P2P_Item_Attachment
                                                        [query_vars] => Array
                                                            (
                                                                [post_type] => Array
                                                                    (
                                                                        [0] => attachment
                                                                    )
    
                                                            )
    
                                                    )
    
                                            )
    
                                        [cardinality] => Array
                                            (
                                                [from] => many
                                                [to] => many
                                            )
    
                                        [title] => Array
                                            (
                                                [from] => Parceiros relacionados
                                                [to] => Parceiros relacionados
                                            )
    
                                        [labels] => Array
                                            (
                                                [from] => stdClass Object
                                                    (
                                                        [name] => Projetos
                                                        [singular_name] => Projeto
                                                        [add_new] => Inserir novo
                                                        [add_new_item] => Inserir novo projeto
                                                        [edit_item] => Editar projeto
                                                        [new_item] => Novo projeto
                                                        [view_item] => Ver projeto
                                                        [search_items] => Buscar projetos
                                                        [not_found] => Nenhum projeto encontrado
                                                        [not_found_in_trash] => Nenhum projeto encontrado na Lixeira
                                                        [parent_item_colon] =>
                                                        [all_items] => Projetos
                                                        [menu_name] => Projetos
                                                        [edit] => Editar
                                                        [view] => Ver projeto
                                                        [parent] => Projeto Pai
                                                        [name_admin_bar] => Projeto
                                                        [create] => Create connections
                                                        [0] =>
                                                    )
    
                                                [to] => stdClass Object
                                                    (
                                                        [name] => Mídia
                                                        [singular_name] => Mídia
                                                        [add_new] => Adicionar Novo
                                                        [add_new_item] => Adicionar novo post
                                                        [edit_item] => Editar Mídia
                                                        [new_item] => Novo Post
                                                        [view_item] => Ver Post
                                                        [search_items] => Pesquisar posts
                                                        [not_found] => Nenhum post encontrado.
                                                        [not_found_in_trash] => Nenhum post encontrado na Lixeira.
                                                        [parent_item_colon] =>
                                                        [all_items] => Mídia
                                                        [menu_name] => Mídia
                                                        [name_admin_bar] => Mídia
                                                        [create] => Create connections
                                                        [0] =>
                                                    )
    
                                            )
    
                                        [fields] => Array
                                            (
                                            )
    
                                        [name] => parceiro_to_projeto
                                        [data] => Array
                                            (
                                            )
    
                                        [duplicate_connections] =>
                                        [self_connections] => 1
                                        [sortable] =>
                                        [reciprocal] =>
                                    )
    
                                [direction:protected] => to
                            )
    
                    )
    
                [items:protected] => stdClass Object
                    (
                        [ID] => 14
                        [post_author] => 2
                        [post_date] => 2012-06-19 18:43:47
                        [post_date_gmt] => 2012-06-19 21:43:47
                        [post_content] => Para confirmar o Show de lan?amento do novo CD da Pequena Morte, precisamos arrecadar R$5.000, divididos em 200 ingressos reembolsáveis (R$ 25 cada). Com o show confirmado, a venda de ingressos normais (R$ 40 Inteira e R$20 Meia) come?a. Com a venda de 300, os Variantes recebem reembolso integral e assistem ao show de gra?a.
    
    Temos até o final do dia 25/06, Quinta-Feira, para confirmar a presen?a do Pequena Morte no Chevrolet Hall.
                        [post_title] => Lan?amento do CD da Pequena Morte
                        [post_excerpt] =>
                        [post_status] => publish
                        [comment_status] => open
                        [ping_status] => closed
                        [post_password] =>
                        [post_name] => lancamento-cd-pequena-morte
                        [to_ping] =>
                        [pinged] =>
                        [post_modified] => 2012-08-27 18:27:46
                        [post_modified_gmt] => 2012-08-27 21:27:46
                        [post_content_filtered] =>
                        [post_parent] => 0
                        [guid] => https://variavel5.wpengine.com/?post_type=projeto&p=14
                        [menu_order] => 0
                        [post_type] => projeto
                        [post_mime_type] =>
                        [comment_count] => 0
                        [ancestors] => Array
                            (
                            )
    
                        [filter] => raw
                    )
    
                [query:protected] => Array
                    (
                    )
    
                [meta:protected] => Array
                    (
                    )
    
                [orderby:protected] =>
                [order:protected] =>
                [order_num:protected] =>
            )
    
        [request] => SELECT   wp_posts.*, wp_p2p.* FROM wp_posts  INNER JOIN wp_p2p WHERE 1=1  AND wp_posts.post_type IN ('projeto') AND (wp_posts.post_status = 'publish' OR wp_posts.post_author = 2 AND wp_posts.post_status = 'private') AND (wp_p2p.p2p_type = 'parceiro_to_projeto' AND wp_posts.ID = wp_p2p.p2p_from AND wp_p2p.p2p_to IN (SELECT   wp_posts.ID FROM wp_posts  WHERE 1=1  AND wp_posts.ID IN (14) AND wp_posts.post_type IN ('attachment') AND (wp_posts.post_status = 'inherit')  ORDER BY wp_posts.post_date DESC ))  ORDER BY wp_posts.post_date DESC
        [posts] => Array
            (
            )
    
    )

    I know that there are specific functions in WP to achieve similar goal but I want a curated list of related images.

    Thread Starter Marlon Amancio

    (@marlonlamancio)

    I had noticed this, but I thought there was another way.

    Thanks for your attention!

    Are ‘Movie Trailer’ and ‘Movie Hub’ the names of custom post types?

    Because cpt can not contain capital letters or spaces and name parameter of connection type either.

    Cpts name should be some like ‘movie_trailer’ and ‘movie_hub’. Connection name some like ‘movie_trailer_to_movie_hub’.

    Awesome! I love P2P! Thanks Scribu!

Viewing 15 replies - 16 through 30 (of 41 total)