Home › Forums › Calendar Products › Events Calendar PRO › Editing the Events page
- This topic has 8 replies, 2 voices, and was last updated 9 years, 6 months ago by Brian.
-
AuthorPosts
-
October 21, 2014 at 7:14 am #824350theimageworksParticipant
The events page is setting the page featured image and page title to that of the last edited event. Please can you help resolve this issue.
I ideally would like it to show the next upcoming event but setting a default title and featured image for this page would suffice.
Thanks in advance.
October 21, 2014 at 8:13 am #824487BrianKeymasterHello theimageworks,
Sorry for the issues you are having, I can help get this back on track with you.
I am unclear on exactly what you are asking. Could you clarify these statements:
The events page is setting the page featured image and page title to that of the last edited event. Please can you help resolve this issue.
Please provide the url’s for where this is happening.
Let me know and we can go from there.
Thanks
October 21, 2014 at 8:57 am #824643theimageworksParticipantThis reply is private.
October 21, 2014 at 11:47 am #825029BrianKeymasterOk that makes sense now. I am afraid that is done from your theme and not part of the Events Calendar.
It looks like your theme pulls the first featured image it can find to place in that area.
Not knowing how that coding work I would assume you would have to go in and modify that function using some of these conditionals on this page:
https://gist.github.com/jo-snips/2415009
To target the main Events Page.
Unfortunately, all my tips are going to be similar to that that as we do not have your theme and it is beyond the support we can provide on the forum for theme compatibility changes.
October 22, 2014 at 2:19 am #826552theimageworksParticipantIt’s just a theme that is part of the Genesis Framework so nothing too fancy. The only thing different is that I can set featured images on pages as well as posts.
I have the following code to move the page title over the featured image:
if ( tribe_is_event() ) {
echo ‘<div class=”entry-header-wrapper”><div class=”wrap”><div id=”title-desc”>’;
genesis_do_post_title();
echo ‘<p>We hope to see you there!</p>’;
echo ‘</div></div></div>’;remove_action( ‘genesis_entry_header’, ‘genesis_entry_header_markup_open’, 5 );
remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
remove_action( ‘genesis_entry_header’, ‘genesis_entry_header_markup_close’, 15 );If the events page had its own physical page it would be a piece of cake but unfortunately is doesn’t.
So from what you’re saying I guess I need to add something along the lines of:
if( tribe_is_month() ) {
set the page featured image to xxxc.jpg
}October 22, 2014 at 2:24 am #826556theimageworksParticipantOh sorry and the code i have to set the featured image is as follows:
wp_enqueue_script( ‘sk-backstretch’, get_bloginfo( ‘stylesheet_directory’ ) . ‘/js/jquery.backstretch.min.js’, array( ‘jquery’ ), ‘1.0.0’ );
wp_enqueue_script( ‘sk-backstretch-set’, get_bloginfo(‘stylesheet_directory’).’/js/backstretch-set.js’ , array( ‘jquery’, ‘sk-backstretch’ ), ‘1.0.0’ );wp_localize_script( ‘sk-backstretch-set’, ‘BackStretchImg’, array( ‘src’ => str_replace( ‘http:’, ”, genesis_get_image( array(‘format’ => ‘url’) ) ) ) );
October 22, 2014 at 6:01 am #826811BrianKeymasterSo I think you are on the right track.
I added some notes below to your comments.
If the events page had its own physical page it would be a piece of cake but unfortunately is doesn’t.
Yes, cake would be good. 🙂 I also have a little trouble integrating with Genesis on building my own sites I usually go and directly edit the templates to get it how I want it to work.
As you say:
So from what you’re saying I guess I need to add something along the lines of:
if( tribe_is_month() ) {
set the page featured image to xxxc.jpg
}Something like that would be the way I would do it. You would have to add && !tribe_is_month() to this conditional tribe_is_event() for your first if statement.
You may have to add a conditional on this as well and directly set the url to a default image instead of using genesis_get_image. (Just gave a presentation on using the Genesis Framework and did not even know that was a function, learn something new every day!)
wp_localize_script( ‘sk-backstretch-set’, ‘BackStretchImg’, array( ‘src’ => str_replace( ‘http:’, ”, genesis_get_image( array(‘format’ => ‘url’) ) ) ) );
Let me know if you can get that working or have any more questions and I can try to answer them.
Thanks
October 24, 2014 at 1:59 am #831875theimageworksParticipantAwesome, I’ve resolved this now. Thank you for your help!
October 24, 2014 at 6:55 am #832345BrianKeymasterGreat, glad it helps, I am going to go ahead and close this ticket, but if you need any other on something else please post a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Editing the Events page’ is closed to new replies.