ladyjey
Forum Replies Created
-
Forum: Plugins
In reply to: [WP ULike - All-in-One Engagement Toolkit] Ulike button/text not visibleautomatic display didn’t work so I put the <?php if(function_exists(‘wp_ulike’)) wp_ulike(‘get’); ?> in the template itself so it’s now showing.
I found really interesting thing.. this is not plugin conflict … i tried that already.
but the word Admin in the member role. Just to cover all bases. I tried turning on and off different member roles to be listed. and all roles works fine except for “Room Admin” strange because the default (core-built-in) “Admin” is fine.
So instead of “Room Admin”, I’ve named the role “Room Moderator” and alls well.
you might want to look into this for the future release.
thank you for your help
Forum: Plugins
In reply to: [WP ULike - All-in-One Engagement Toolkit] deleting pluginthank you Alimir
thank you
Forum: Plugins
In reply to: [WP Notes Widget] creating new note from sidebarThank you Steve for the considerations.
Forum: Plugins
In reply to: [WP Notes Widget] creating new note by non-adminThank you so much for the guidance and suggestions Steve, I’ll certainly look into it. Thank you~
thank you agelonwl for your tip to use parts of events-manager/templates/templates/events-list.php. you were so correct.
as for the #2 returning no list, that was a logic error in my part.
the page offset shouldn’t have been $args[‘offset’] = ($args[‘page’]-1) * $args[‘limit’];but, $args[‘offset’]= ($args[‘page’] – 1) * $args[‘limit’] + 1;
Also, I took out all the $args that doesn’t seem to do anything…
$args[‘scope’]=’future’;
$args[‘orderby’]=’event_start_date,event_start_time,event_name’;
$args[‘order’]=’DESC,DESC,ASC’;
$args[‘pagination’] = true;I’m still trying to get the event order in ascending order, not descending. but at least the pagination is now working.
thank you agelonwl and marcus for your help.
Thank you agelonwi, I’ve copied the pagination script from the link you gave me and the pagination is working. But pages above #2 returns no list to be listed
sorry. I’ve posted the codes here https://pastebin.com/aXDbhZbg
the pagination does work, but pages above #2 doesn’t return events to be listed.
Hello agelonwi, thank you for quick reply as usual. :0
I am using the latest version Version 5.3.5. however, I had to make a events template separately due to split page formatting…first 3 on the returned events are formatted differently from the rest of the returned events (4-10).
my template script is as follows:
<?php
/*
Template Name: Events
*/
?><?
$showdetail = 4;
$i=0;
?><?php get_header(); ?>
<div id=”primary”>
<header>
<h1>EVENTS LIST</h1>
</header>
<div class=”content “><?php
$events = EM_Events::get( apply_filters(’em_content_events_args’, $args) );
$args[‘limit’] = “10”;
$args[‘pagination’] = “1”;
$args[‘page’] = (!empty($_REQUEST[‘page’]) && is_numeric($_REQUEST[‘page’]) )? $_REQUEST[‘page’] : 1;
$events_count = count($events);
$curevents = EM_Events::get( apply_filters(’em_content_events_args’, $args) );?>
<?php
if( $events_count > 0 ){?><?php foreach ($curevents as $EM_Event) : ?>
<?php $i++;//$EM_Event = em_get_event($post->ID, ‘post_id’);
$eventName = $EM_Event->output(‘#_EVENTNAME’);
//$eventName = $EM_Event->output(‘#_EVENTNAME’);
$eventLink = $EM_Event->output(‘#_EVENTLINK’);
$eventPageURL = $EM_Event->output(‘#_EVENTURL’);
$eventImage = $EM_Event->output(‘#_EVENTIMAGE’);
$eventDates = $EM_Event->output(‘#_EVENTDATES’);
$eventTimes = $EM_Event->output(‘#_EVENTTIMES’);
$locationName = $EM_Event->output(‘#_LOCATIONNAME’);
$locationfullline = $EM_Event->output(‘#_LOCATIONFULLLINE’);
$locationaddress = $EM_Event->output(‘#_LOCATIONADDRESS’);
$locationtown = $EM_Event->output(‘#_LOCATIONTOWN’);
$locationstate = $EM_Event->output(‘#_LOCATIONSTATE’);
$locationzip = $EM_Event->output(‘#_LOCATIONPOSTCODE’);
$webLink = $EM_Event->output(‘#_ATT{Web Link}’);
$venueID= $EM_Event->output(‘#_LOCATIONEXCERPT’);
$venueURL= get_permalink($venueID);
?><?php if ($i<$showdetail){?>
<div id=”post-<?php the_ID(); ?>” class=”events-event-box”>
“><?=$eventImage?>
<h2 class=”list-title”><?=$eventLink?></h2>
<h4 class=”eventlist-day”><?=$eventDates?></h4>
<h4 class=”eventlist-day”><?=$eventTimes?></h4><div class=”eventlist-content”>
” target=”_new”>Get Ticket
</div></div> <!– End post –>
<?}else{?>
<div id=”post-<?php the_ID(); ?>” class=”events-event-list”>
<div class=”date-col”>
<h4 class=”eventlist-day”><?=$eventDates?></h4>
</div>
<div class=”title-col”>
<h2 class=”list-title”><?=$eventLink?></h2>
</div>
<div class=”venue-col”>
” target=”_blank”><?=$locationName?>
</div>
<div class=”ticket-col”>
” target=”_new”>Get Ticket
</div>
</div><?}//endif?>
<?php?>
<div><?=$eventCategory?></div>
<?php endforeach; /* End loop */ ?>
<?php
if( !empty($args[‘limit’]) && $events_count > $args[‘limit’] ){
//Show the pagination links (unless there’s less than $limit events)
$search_args = EM_Events::get_post_search() + array(‘page’=>’%PAGE%’,’_wpnonce’=>$_REQUEST[‘_wpnonce’]);
$page_link_template = preg_replace(‘/(&|\?)page=\d+/i’,”,$_SERVER[‘REQUEST_URI’]);
$page_link_template = em_add_get_params($page_link_template, $search_args);
echo apply_filters(’em_events_output_pagination’, em_paginate( $page_link_template, $events_count, $args[‘limit’], $args[‘page’]), $page_link_template, $events_count, $args[‘limit’], $args[‘page’]);
}
?><?php }else{
echo get_option ( ‘dbem_no_events_message’ );
}
?>
</div><!– #content –></div><!– #primary –>
<?php get_sidebar(); ?>
<?php get_footer(); ?>I tested by typing in /events/2/ and it still goes to 404 page.
how can I resolve this?
I’ve tried the solution given in.
https://www.ads-software.com/support/topic/plugin-events-manager-pagination-location-insert-at-top?replies=16<?php
if( !empty($args[‘limit’]) && $events_count > $args[‘limit’] ){
//Show the pagination links (unless there’s less than $limit events)
$search_args = EM_Events::get_post_search() + array(‘page’=>’%PAGE%’);
$page_link_template = preg_replace(‘/(&|\?)page=\d+/i’,”,$_SERVER[‘REQUEST_URI’]);
$page_link_template = em_add_get_params($page_link_template, $search_args);
echo apply_filters(’em_events_output_pagination’, em_paginate( $page_link_template, $events_count, $args[‘limit’], $args[‘page’]), $page_link_template, $events_count, $args[‘limit’], $args[‘page’]);
}
?>but it give the url as /?page=pagenumber (/?page=2)
which leads to 404 page.
how can I modify this.
nevermind. I don’t know why it stopped working. but I’ve updated the code with:
$args[‘limit’] = “5”;
$events = EM_Events::get( apply_filters(’em_content_events_args’, $args) );and it returns the events again.
that’s exactly what I needed. thank you so much. you are the best!
I saw the full calendar plugin, so I’ve set the event manager calendar to use that interface. but still the title/description/time range for rollover issue is still present for full calendar as well. Do you know where to in WP Full Calendar? Thank you agelonwi
hello Marcus,
what I ended up doing was for the Events page, create a separate event template on the main directory, and pointed to it instead of default on the admin->pages->Events.
so that the Event Page will have different layout than one formatted using Events Format tool. Events Format is being used for shortcodes only. Now, only if I can get shorcodes to have different styling depending on the page…. I think what I’ll do is have classname to be pulled from pagename or something and make that dynamic…
thank you agelonwl and marcus for your help.