Forum Replies Created

Viewing 15 replies - 1 through 15 (of 38 total)
  • Agence Myso

    (@agence-myso)

    Thank you @abhay-raj for helping !

    Same problem. I tried another plugin (Reorder posts) : same same…

    Thread Starter Agence Myso

    (@agence-myso)

    In case someone ever come to this page. I found the key to solve this mystery.
    I am using Mailpoet to send newsletters. If you pay attention very carefully to the options, you will find one which proposes to have Mailpoet taking care of all the mails sent by the site. DO NOT USE THIS OPTION. It is getting rid of the mail attached files, even if they come from another plugin, as WPCF7.
    SO this is it. Everything works fine now. I only lost 8 hours in my life ??.

    Thread Starter Agence Myso

    (@agence-myso)

    Hello again,

    After some weeks I must say that the problem is still there and really annoying. Sometimes files are sent, sometimes not. I have an ID displayed in Flamingo, which testifies that something was attached, but the file is most of the time missing in the mail. But not all the time. And I cannot see any coherence.
    Please give me some feedback, because I cannot see any solution from my point of view…

    Thank you for your help.

    Thread Starter Agence Myso

    (@agence-myso)

    Hello Takayuki and thank you for responding.

    The mail settings are ok. I found that the form works with most adresses but not for example with mine. This is so weird… I just do not receive attachments on my Gmail address. But if I put the Gmail address of my girlfriend, it works ??.
    And if I put my professional address, it works as well.
    For the moment being, my client started again to receive attachments so it’s ok. But I would love to understand what’s happening with my Gmail address…

    • This reply was modified 2 years, 4 months ago by Agence Myso.
    Thread Starter Agence Myso

    (@agence-myso)

    I just found that the problem will not occur with every mail address. If I put a Gmail address as receiver (in the admin), attachments are not included in the emails. If I put an email address from my own domain, it works…
    Anyone already noticed that ?

    • This reply was modified 2 years, 4 months ago by Agence Myso.
    • This reply was modified 2 years, 4 months ago by Agence Myso.
    Thread Starter Agence Myso

    (@agence-myso)

    My bad…
    I hadn’t noticed it is possible to add any custom field to the search query… You should highlight this function, as it is brilliant !
    Hope it will help someone saving time…

    Thread Starter Agence Myso

    (@agence-myso)

    Ok, I’ve found the problem.
    Another plugin “Woocommerce search by sku” is conflicting with your plugin…
    But as I need both search methods and Relevanssi doesn’t offer the possibility to search by sku, I am still stuck with my problem…

    Thread Starter Agence Myso

    (@agence-myso)

    I also tried the get_adjacent_post function, which does not work the right way. It retrieves previous post instead of next post… The contrary is also true.

    Thread Starter Agence Myso

    (@agence-myso)

    Hello,

    I use the common get_posts query with those parameters :

    $videos = array(
                    'posts_per_page' => -1,
                    'post_type' => 'video',
                    'category' => $category_id,
                    'orderby' => 'menu_order',
                    'order' => 'DESC'
                );
                $cat_posts = get_posts( $videos );
                    foreach ( $cat_posts as $post ) : setup_postdata( $post );
    Forum: Hacks
    In reply to: `get_posts` by months?
    Thread Starter Agence Myso

    (@agence-myso)

    That’s a smart proposal !
    Let’s try this and I’ll tell you.
    Thanks a lot !

    Forum: Hacks
    In reply to: `get_posts` by months?
    Thread Starter Agence Myso

    (@agence-myso)

    Ok, now it works…
    I just used an underscore in place of a dash in get_field('video-webm') etc.
    After hours of searching a solution, it’s hard to focus on details…

    But if anyone has an idea about how to display posts by two ways (without using Ajax) I am still very interested…

    Forum: Hacks
    In reply to: `get_posts` by months?
    Thread Starter Agence Myso

    (@agence-myso)

    Just to let you know.

    As I am trying different approches, I am also trying to display the videos with Ajax (which won’t give me the full URL, but will allow me to display the video without getting out of the NEWS section).

    I am calling the videos (posts) this way :

    <?php 
    
    if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
                    <?php $next_vid = get_permalink(get_adjacent_post( true, '', true )); ?>
    
                    <?php get_the_date(); ?>
    
    	<video id="my-video-js" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" autoplay
    		data-setup='{}' width="100%" height="auto">
    			<source src="<?php echo get_field('source_mp4')['url']; ?>" type="video/mp4">
    			<source src="<?php echo get_field('video_webm')['url']; ?>" type="video/webm">
    	</video>
    
    	<?php endwhile;?>
    	<?php die();
    }

    But it doesn’t work… the video-containerdiv loads, the my-video-js also. But it doesn’t load the video. I can’t get it to load the link to the videos…

    Forum: Hacks
    In reply to: `get_posts` by months?
    Thread Starter Agence Myso

    (@agence-myso)

    Hehe, I’m sorry I have to tell you your second hypothesis was the good one…
    Let me be more precise.
    The same posts have to be called by two different ways : as category items or as dated items.
    Why is that? Because I have built a three-level-menu which is always visible.
    If you go to NEWS / OCTOBER 2014, you will have three columns, the last one displaying a list of posts which you will also be able to find in their own categories in VIDEOS / CATEGORIES /POSTS or PRINT / CATEGORIES / POSTS.
    So, when I call the_permalink(); in my NEWS / MONTH / list of posts, I have my list with good permalinks.
    The problem is that the_permalink(); brings the user to the corresponding category, whereas I would like to stay in NEWS / OCTOBER / POST.

    As a good code example is always better than tons of words, let me present you the content of my date.php :

    <?php get_header(); ?>
    
    <div class="navigation col-lg-4 col-md-4 col-xs-12">
    
                    <div class="menu1 col-lg-4 col-md-4 col-xs-4">
    
                        <?php
                             $args = array(
                                'theme_location' => 'header-menu'
                            );
                            wp_nav_menu($args);
                        ?>
                    </div>
    
                    <div class="menu2 col-lg-4 col-md-4 col-xs-4">
    
                    <?php
                    $args = array(
                            'type'            => 'monthly',
                            'post_type'       => 'video',
                            'limit'           => '',
                            'format'          => 'html',
                            'before'          => '',
                            'after'           => '',
                            'show_post_count' => false,
                            'echo'            => 1,
                            'order'           => 'DESC'
                        );
                    wp_get_archives_cpt($args); ?>
    
                    </div>
    
                    <div class="menu3 col-lg-4 col-md-4 col-xs-4">
    
                    <?php 
    
                    /* var_dump($GLOBALS['wp_query']); */
    
                    $month = get_the_time('m');
    
                            $args = array(
                                'post_type'  => array('video'),
                                'order'      => 'ASC',
                                'date_query' => array(
                                    array(
                                        'month' => $month
                                    ),
                                )
                            );
    
                            $the_query = new WP_Query($args);
                            if ( $the_query->have_posts() ) :
                            echo '<ul>';
                                while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
                                        <li><a class="post-link" href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
                                    <?php
                                endwhile;
                            echo '</ul>';
                            endif; ?>             
    
                    </div>          
    
     </div>
    Forum: Hacks
    In reply to: `get_posts` by months?
    Thread Starter Agence Myso

    (@agence-myso)

    Hello,

    I’m sorry I’ve taken time to thank you and be more precise in my explanations…

    What I want to do is to display posts (video custom posts in this particular case) by two ways :
    -Category
    -date

    When you arrive on the website, you have three menus : NEWS / VIDEOS / PRINT.
    VIDEOS and PRINT will lead you to category menus, no problem.

    NEWS will lead you to a custom menu, where posts of the other categories are displayed by month.
    So, if you click on NEWS, you will get into archive.php, where you will have a list of months. Ok for this. Once you click on a month, a list of posts will be displayed. This is ok too.

    Problem : when I click on a post listed by month, I get the post in its category. I mean, for example, you click on video2 : that brings you to VIDEOS/CATEGORY/VIDEO2, whereas I want it to be displayed in NEWS/DECEMBER 2014/VIDEO2.

    Is it possible to do that?

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