Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
omorfizoi.gr
tagDiv Member

The changes from the child theme are still there but you will need to re-edit all your changes into the composer plugin

Hello. we have the same issue. Fortunately we first tried the update in our staging site and so we refrained from updating the live one.

So, I have a question: Are we supposed to edit the Composer plugin files directly? But, if we do, the changes will be lost in the next Composer update. Other plugins (eg. WooCommerce, TheEventsCalendar) allow us to put any customized files in a special folder inside the child theme in order to overwrite their defaults. Can we do the same for NewPaper?

Thanks

omorfizoi.gr
tagDiv Member

Hello again. Thank you for the suggestion. I tried inserting the code you suggested:
<?php echo $td_mod_single->get_views();?>
but then, the page brakes (it displays the page normaly up to the point where the code is but bellow that, everything is blank).

I thought it might also need this:
$td_mod_single = new td_module_single($post);
but then, I get an error like:
wp_booster error:
td_module: td_module_single($post): $post is not WP_Post
/var/www/omorfizoi.gr/htdocs/wp-content/themes/Newspaper/includes/wp_booster/td_module.php
Display backtrace

at the top of the page. Then the counter is displayed, but with 0 views.

omorfizoi.gr
tagDiv Member

Hello again. The “events” are actualy a custom post type (called “tribe-events”) and they use their own page template. Is there a function I can insert so that the counter can appear?

For reference, here is the default, uncustomised template file for a single event (called “single-event.php”):

<?php
/**
* Single Event Template
* A single event. This displays the event title, description, meta, and
* optionally, the Google map for the event.
*
* Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
*
* @package TribeEventsCalendar
* @version 4.6.19
*
*/

if ( ! defined( 'ABSPATH' ) ) {
die( '-1' );
}

$events_label_singular = tribe_get_event_label_singular();
$events_label_plural = tribe_get_event_label_plural();

$event_id = get_the_ID();

?>

<div id="tribe-events-content" class="tribe-events-single">

<p class="tribe-events-back">
"> <?php printf( '« ' . esc_html_x( 'All %s', '%s Events plural label', 'the-events-calendar' ), $events_label_plural ); ?>
</p>

<!-- Notices -->
<?php tribe_the_notices() ?>

<?php the_title( '<h1 class="tribe-events-single-event-title">', '</h1>' ); ?>

<div class="tribe-events-schedule tribe-clearfix">
<?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>
<?php if ( tribe_get_cost() ) : ?>
<span class="tribe-events-cost"><?php echo tribe_get_cost( null, true ) ?></span>
<?php endif; ?>
</div>

<!-- Event header -->
<div id="tribe-events-header" <?php tribe_events_the_header_attributes() ?>>
<!-- Navigation -->
<nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>">
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?>

<!-- .tribe-events-sub-nav -->
</nav>
</div>
<!-- #tribe-events-header -->

<?php while ( have_posts() ) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<!-- Event featured image, but exclude link -->
<?php echo tribe_event_featured_image( $event_id, 'full', false ); ?>

<!-- Event content -->
<?php do_action( 'tribe_events_single_event_before_the_content' ) ?>
<div class="tribe-events-single-event-description tribe-events-content">
<?php the_content(); ?>
</div>
<!-- .tribe-events-single-event-description -->
<?php do_action( 'tribe_events_single_event_after_the_content' ) ?>

<!-- Event meta -->
<?php do_action( 'tribe_events_single_event_before_the_meta' ) ?>
<?php tribe_get_template_part( 'modules/meta' ); ?>
<?php do_action( 'tribe_events_single_event_after_the_meta' ) ?>
</div> <!-- #post-x -->
<?php if ( get_post_type() == Tribe__Events__Main::POSTTYPE && tribe_get_option( 'showComments', false ) ) comments_template() ?>
<?php endwhile; ?>

<!-- Event footer -->
<div id="tribe-events-footer">
<!-- Navigation -->
<nav class="tribe-events-nav-pagination" aria-label="<?php printf( esc_html__( '%s Navigation', 'the-events-calendar' ), $events_label_singular ); ?>">
<ul class="tribe-events-sub-nav">
<li class="tribe-events-nav-previous"><?php tribe_the_prev_event_link( '<span>«</span> %title%' ) ?>
<li class="tribe-events-nav-next"><?php tribe_the_next_event_link( '%title% <span>»</span>' ) ?>

<!-- .tribe-events-sub-nav -->
</nav>
</div>
<!-- #tribe-events-footer -->

</div><!-- #tribe-events-content -->

omorfizoi.gr
tagDiv Member

Hello,
After updating to the latest theme version, the problem seem to have resolved itself. I will monitor the behavior of the site and come back if the problem reappears.
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)