Forum Replies Created

Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter dd46

    (@dd46)

    Thanks for the answer, I will try it

    Thread Starter dd46

    (@dd46)

    Hi, is there any support ?

    Thread Starter dd46

    (@dd46)

    Thanks a lot you was right, just because I was thinking that ‘taxonomy’ => ‘category’ was different of between taxonomy and posts,
    this my three tabs :

    $tax = $wp_query->query_vars["taxonomy"];
    $tax_term = $wp_query->query_vars["term"];

    <!– Contenu TABS 1 –>

    <?php $tab1_args = array(
    	'tax_query' => array(
    		'relation' => 'AND',
    		array(
    			'taxonomy' => 'category',
    			'field' => 'slug',
    			'terms' => 'news',
    		),
    		array(
    			'taxonomy' => $tax,
    			'field' => 'slug',
    			'terms' => $tax_term
    		)
    	)
    );
    $tab1_query = new WP_Query( $tab1_args ); while($tab1_query->have_posts()) : $tab1_query->the_post(); ?>
    //Loops here
    <?php endwhile; wp_reset_query(); ?>

    <!– Contenu TABS 2 –>

    the same as first, just change the category

    <!– Contenu TABS 3 –>

    <?php $tab3_args = array(
    		'post_type' => 'ficheartist',
    
    		'tax_query' => array(
    
    		array(
    			'taxonomy' => $tax,
    			'field' => 'slug',
    			'terms' => $tax_term
    		)
    	)
    );
    $tab3_query = new WP_Query( $tab3_args ); while($tab3_query->have_posts()) : $tab3_query->the_post(); ?>
    //Loops here
    <?php endwhile; ?>
    Thread Starter dd46

    (@dd46)

    Yes I saw this query and try it, but it doesn’t dsiplay anything. In my case I just have one taxonomy : nomartist with a term created by me in the admin : $term (this term will be tagged on the post with category news and on custom-post-type fiche artist).
    I have a post category : news and custom-post : ficheartist.
    This is the query for the firts tab, but it doesn’t display anything :

    <div id="tab1" class="tab_content"><?php global $post, $wp_query;
    	$tax_term = $wp_query->query_vars["term"];
    	$tab1_args = array(
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'nomartist',
    			'field' => 'slug',
    			'terms' => $tax_term
    		)
    	)
    );
    $tab1_query = new WP_Query( $tab1_args ); while($tab1_query->have_posts()) : $tab1_query->the_post(); ?>
    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content(); endwhile; ?>
    </div>
    Thread Starter dd46

    (@dd46)

    Hi, thanks for your answer,

    I’ve tried this too, but I am on a computer now, I am going to try to explain you the problem :

    This is my template files and my categories :

    • index.php
    • single.php
    • taxonomy-nomartist.php (traxonomy)
    • single-ficheartist.php (custom post type)
    • News
    • Reviews

    My taxonomy nomartist was created to link the posts with category News, Reviews and the post-type ficheartist with jQuery tabs on the taxonomy-nomartist.php template.
    This what I would like to do :

    <– tabs 1 –> post category 1
    the taxonomy term will always change with the name of the artist, so I need to take it in the page.

    $tax_term = $wp_query->query_vars["term"];
    $args = array(
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'nomartsit',
                            'category' => 'news',
    			'field' => 'slug',
    			'terms' => '$tax_term'
    		)
    	)
    );
    $query = new WP_Query( $args );

    <– tabs 2 –> post category 2, change only ‘category’ => ‘reviews’,

    <– tabs 3 –> custom-post type “ficheartist”, remove ‘category’ => ‘reviews’ and add ‘post-type’ => ‘ficheartist’.

    Thread Starter dd46

    (@dd46)

    Hi, yes I already try it and the problem is that it gives all the post from from the blog with category 1 and I think it breaks the taxonomy loop, because I just want post from category 1 with taxonomy nom artist.

    dd46

    (@dd46)

    Check if you can access YOUR G3 like this if guest access is enabled.
    https://wpg3.local/gallery3/index.php/rest/item/1?output=html
    This would mean: g3 Rest is working.

    I try it and it works fine, I have the array. My galery was empty I created one album with images. However I still have the fatal error when saving settings WPG3 plugin.
    I think I am going to wait for a development fix, thanks for this plugin, for your contribution and for your support ??
    Best regards

    dd46

    (@dd46)

    You can see the code here : https://wordpress.pastebin.com/mkTW8kYE

    dd46

    (@dd46)

    Perhaps it could help, but since I enabled guest access to 1, I now have this code in a small window wich indicate that is a json document. I save it and open it with Notepad++, this is the return of the REST API test url (https://localhost/wptheme/galeries/index.php/rest/item/1) :

    [Code moderated as per the Forum Rules. Please use the pastebin]

    dd46

    (@dd46)

    Hello, thanks for your help,
    I uncommented the line 237, but I always have the same error message, I have changed the guest access to true(1) and can not save the wp-admin WPG3 plugin settings without the fatal error too…

    dd46

    (@dd46)

    Hi, I have installed Gallery3 in local server(Wamp) at the root of wordpress 3.0.5 installation, activated REST API module (gallery 3 is working nice) , after installing WPG3 plugin, enter the url and the REST API Key when I want to save it I have got this error message :
    Fatal error: Cannot use object of type WP_Error as array in C:\wamp\www\wptheme\wp-content\plugins\wpg3\wpg3_class_wpg3_xhttp.php on line 236
    this is the gallery3 url used in the settings : https://localhost/wptheme/galeries/index.php

    I think the problem comes from REST API. I tested it with this url
    https://localhost/wptheme/galeries/index.php/rest/item/1
    and I have got the array. I don’t know what to do ? Thanks in advance ??

    dd46

    (@dd46)

    Hi, perhaps it’s too late but it could be helpfull for others.
    You need to clean the WPG3 plug-in options in the WP database. Go in PhpMyAdmin and find the wp_options row, search for WPG3 options ans delete it.
    Or you can do the same by installing Clean options plug-in :
    https://www.ads-software.com/extend/plugins/clean-options/

    Thread Starter dd46

    (@dd46)

    Hi, nobody can help me ?

    Thread Starter dd46

    (@dd46)

    Hi thanks for your reply, I didn’t think this way and I read your links for a better understanding of wordpress.
    For my news display I think I can use query_posts like this :

    <?php
    function filter_where($where = '') {
        //posts in the last 3 days
        $where .= " AND post_date > '" . date('Y-m-d', strtotime('-3 days')) . "'";
        return $where;
      }
    add_filter('posts_where', 'filter_where');
    query_posts($query_string);
    ?>

    But how to start the display of the news today and count it two days in the past ? How to display the date of each day and the time before each news title ?
    Thanks

    Thread Starter dd46

    (@dd46)

    Hi thanks for this link, but it seems to be for the archive article. If possible I would like to display the last news of the 3 or 4 days with a maximum number of 20 news.
    But thanks for your reply, I am going to look inside the code of this plug-in for understanding how to do my specific script ??
    Please is there someone who know how to build this particular script ?

Viewing 15 replies - 1 through 15 (of 15 total)