• Resolved insept

    (@insept)


    Hello, by far hueman is the best template for what i’m trying to do.
    But the only problem is that the events plug-ins are working badly only at that template. I tryed different one and it worked,

    The problem is that the plugin creates a event.. and this event was suposed to show itself at the blog page as a ‘post’
    but at hueman template this is not happening.

    what can i do? please,

Viewing 15 replies - 16 through 30 (of 35 total)
  • Thread Starter insept

    (@insept)

    Ohh, thas a little bit sad,

    I did contact them first, but they asked to me to try with diferents themes, and all of it worked very well. But the other themes doesn′t offer me the same resources that Hueman does. So for that reason, they told me to contact the Hueman support.
    At the same time, i didn′t find other event plugin better than this one.
    So I′m stuck between 2 great things that doesn′t work together =/

    Do you think that could work in some other way? any idea? anything?
    If you think that is better i can provide to you all my passwords, because i have no other way to make it work. ??

    bdbrown

    (@bdbrown)

    Did some additional research and testing. Give this a try. In the function I posted, change this line:

    $query->set('post_type', array( 'post', 'tribe_event' ) );

    to this:

    $query->set('post_type', array( 'post', 'tribe_events' ) );

    Very subtle difference but it worked on a test site I set up.

    Thread Starter insept

    (@insept)

    GREAT!!! This is a real good News! Thank you very much

    The most difficult you figured out how to do.
    Let me understand from you if we can set up this in a different way:

    Before we made this changes, i usualy have the main post and the old posts much smaller below the main one. like this https://useindaiatuba.org.br/category/artigos/

    but now all the posts are concentrated in a big slider..
    and for the events there are big pictures..

    Is it possible to have the new post bigger and the others small
    with no slider at all?

    THank you in advance!

    bdbrown

    (@bdbrown)

    1. You should already have featured.php in your child theme. In the query at the top of that file, change the post_type ‘tribe_event’ to ‘tribe_events’.

    2. Copy the alx_get_featured_post_ids() function to your child theme functions.php file and add the post_type argument:

    function alx_get_featured_post_ids() {
    	$args = array(
    		'post_type' 	=> array( 'post', 'tribe_events' ),
    		'category'	=> ot_get_option('featured-category'),
    		'numberposts'	=> ot_get_option('featured-posts-count')
    	);
    	$posts = get_posts($args);
    	if ( !$posts ) return false;
    	foreach ( $posts as $post )
    		$ids[] = $post->ID;
    	return $ids;
    }

    3. In Theme Options > Blog:
    set Include featured posts in content área = uncheck
    set Featured Category = Choose One
    set Featured Post Count = 1

    This should put your most recent post/event in the slider area at the top of the page.

    Thread Starter insept

    (@insept)

    Another great News! it worked,
    but the events posts they are still big as you can see at ( https://useindaiatuba.org.br/ ) can they get smaller like the other posts?( https://useindaiatuba.org.br/category/artigos/ )

    The idea is that posts and event posts can arrange themselves like they usually do for a regular blog)

    Thanks in advance.

    bdbrown

    (@bdbrown)

    Try this in your child theme css:

    .post-list .tribe_events {
        width: 50%;
        float: left;
    }
    Thread Starter insept

    (@insept)

    That worked very well!

    only minor errors now,
    you will see that now that:

    1- The main place is occupied for the same event, doesnt matter if i post a new event or post.

    2- When i post a new event or post, it doesn′t shows .. only after i post another one.. so the first will be apper.. and the new one will be on hide.

    bdbrown

    (@bdbrown)

    This is the featured post at the top of the home page:

    28 FEV., 2016
    Palestra – Andrei Moreira

    Where do you have a post that is newer than this one?

    Thread Starter insept

    (@insept)

    Hello,
    well in fact this is not the latest, was published on 20th feb, this 28 fev is the date that the event will happen (but i can live with this, if there is no other way)

    but the other issue is a real problem.
    you see.. i posted the POST4
    https://useindaiatuba.org.br/2016/02/21/post-4/
    put it does not appears at the page.
    It will only appear if i post another thing.. but this new thing will not appear,

    Regards

    bdbrown

    (@bdbrown)

    So, we’ve made quite a few changes and adjustments trying to get this to work. My test site works without any problems so let’s make sure you have only the necessary changes in place:

    1. The only theme file you should have in your child theme (at least for what you’re trying to do here) is /inc/featured.php. The query in that file should look like this:

    $featured = new WP_Query(
    	array(
    		'post_type' 			=> array( 'post', 'tribe_events' ),
    		'no_found_rows'			=> false,
    		'update_post_meta_cache'	=> false,
    		'update_post_term_cache'	=> false,
    		'ignore_sticky_posts'		=> 1,
    		'posts_per_page'		=> ot_get_option('featured-posts-count'),
    		'cat'				=> ot_get_option('featured-category')
    	)
    );

    2. In your child theme functions.php file you should have these two functions:

    // add Tribe Event post type to main query
    add_action('pre_get_posts','sept_query_filter');
    function sept_query_filter($query) {
      if ( is_front_page() && $query->is_main_query() ) {
        $query->set('post_type', array( 'post', 'tribe_events' ) );
      }
    }
    
    // add Tribe Event post type to featured post ids
    function alx_get_featured_post_ids() {
    	$args = array(
    		'post_type' 	=> array( 'post', 'tribe_events' ),
    		'category'	=> ot_get_option('featured-category'),
    		'numberposts'	=> ot_get_option('featured-posts-count')
    	);
    	$posts = get_posts($args);
    	if ( !$posts ) return false;
    	foreach ( $posts as $post )
    		$ids[] = $post->ID;
    	return $ids;
    }

    3. Your child theme style.css file should have this:

    .post-list .tribe_events {
      width: 50%;
      float: left;
    }

    4. In Theme Options > Blog:
    Include featured posts in content área – should not be checked
    Featured Category – should not be selected
    Featured Post Count – should be 1

    After verifying that only those changes are in place, if it still doesn’t work, then there is some other conflict.

    Thread Starter insept

    (@insept)

    I have checked and everything is the way that you told to me.

    I run some extra tests here and find out that when i set 0 on Featured Post Count (at theme options > blog) the latest post appears. but the design is not the one that i would like,
    other thing to be considered is that the big event appears only once. at 28th febreaury.

    but if I set 1 on Featured Post Count, the latest post (post 4) disapear. and the event “Palestra – Andrei Moreira” appears twice. One as 28th febreaury, and other time as 20th febreuary (the date that i posted)

    Is this a good hint for you to figure it out what is happening?

    bdbrown

    (@bdbrown)

    As I said above, my test site, which is set up with a default installation of Hueman and the changes I posted above, works without any problems. All the settings on the Tribe Event Calendar are the defaults. The posts and events show up in the correct location and the correct order. The only thing I can think of is that there is a conflict with some other plugin or other change that has been made on your site configuration.

    Thread Starter insept

    (@insept)

    I deleted everything and start over, but the result was the same,

    I want to thank you, I realize that you took some time on helping me!

    I will mark this topic as resolved, in a while, i just would like to ask if you can take an extra look to check based on what i will describe here:

    I disabled the featured, and it worked fine,
    The real issue is when I have the feature, my latest post never shows.
    The event is there, at the day that i posted 22 feb.
    at the feature the event is marked as 28 feb .. the day that will happen. I believe that this event 28 FEB is duplicated with diferente datess, if there is a code that avoid this.. this would work,

    Let me know your thoughts and I can give up in peace

    bdbrown

    (@bdbrown)

    Yes, I ran a test and see what you mean. If the featured post count is set to 1, the event is displayed in the featured post with the date it will be active, and it is displayed in the content area with the date it was actually created. It’s not duplicated; it’s the same event. And the post created more recently isn’t displayed. If you set the featured post count to 2, then both the event and the newer post are shown in the featured posts, and the posts in the content area are correct. Unfortunately I don’t have an answer to fix it. I don’t know enough about how the Event plugin works. The custom post type of the event is obviously affecting how the theme processes it. Only thing I can think of at this point it to check with the plugin support group.

    Thread Starter insept

    (@insept)

    I appreciate all you kind attention.
    Thank you very much!

    I will keep looking, but for now, I belive that I got my answer

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘help with event calendar on hueman template’ is closed to new replies.