WebMan Amplifier

Home Forums Forstron WebMan Amplifier

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20006

    vervocity
    Participant

    WebMan Amplifier

    Resolved

    Hey there! Have you noticed this support service is provided FREE of charge?
    If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you

    Consider a donation →

    Currently, we are using the Forstron theme with a child theme. In the child theme I have the following customizations for the Staff and Projects CPT that you use for the theme and it was worked until we tried to update the theme to the latest version.

    <?php
    /**
     * Posts shortcode item template
     *
     * Default wm_projects item template.
     *
     * Content:
     * - image
     * - title
     * - taxonomy:project_category
     * - excerpt
     *
     * @package    Forstron
     * @copyright  2015 WebMan - Oliver Juhas
     *
     * @since    1.0
     * @version  1.0
     *
     * @uses  array $helper  Contains shortcode $atts array plus additional helper variables.
     */
    
    ?>
    
    <article class="<?php echo $helper['item_class']; ?>"<?php echo wm_schema_org('creative_work'); ?>>
    
        <?php if (has_post_thumbnail($helper['post_id'])) { ?>
            <div class="wm-posts-element wm-html-element image image-container"<?php echo wm_schema_org('image'); ?>>
                <?php
                if ($helper['link']) {
                    echo '<a' . $helper['link'] . wm_schema_org('bookmark') . '>';
                }
                the_post_thumbnail($helper['image_size'], array( 'title' => esc_attr(get_the_title(get_post_thumbnail_id($helper['post_id']))) ));
                if ($helper['link']) {
                    echo '</a>';
                }
                ?>
            </div>
        <?php } ?>
    
        <a<?php echo $helper['link'] . wm_schema_org('bookmark'); ?> class="wm-posts-elements-container">
    
            <div class="wm-posts-element wm-html-element title">
                <<?php echo $helper['atts']['heading_tag'];
    echo wm_schema_org('name'); ?>>
    
                    <?php the_title(); ?>
    
                </<?php echo $helper['atts']['heading_tag']; ?>>
            </div>
            <div class="wm-posts-element wm-html-element title">
                <h2><span class="term"><?php echo get_field('location_name'); ?></span></h2>
            </div>
            <?php
                $terms       = get_the_terms($helper['post_id'], 'project_category');
                $terms_array = array();
            if (! is_wp_error($terms) && ! empty($terms)) {
                    foreach ($terms as $term) {
                        $terms_array[] = '<span class="term term-' . sanitize_html_class($term->slug) . '"' . wm_schema_org('itemprop="keywords"') . '>' . $term->name . '</span>';
                    }
                    echo '<div class="wm-posts-element wm-html-element taxonomy">' . implode(', ', $terms_array) . '</div>' ;
            }
            ?>
    
            <?php
            if (has_excerpt()) {
                    echo '<div class="wm-posts-element wm-html-element excerpt"' . wm_schema_org('description') . '>' . wp_kses_post(get_the_excerpt()) . '</div>';
            }
            ?>
    
        </a>
    
    </article>
    

    Now I am getting errors in reference to the wm_schema_org stuff in the files. There error states the following.

    ( ! ) Fatal error: Uncaught Error: Call to undefined function wm_schema_org() in /home/vagrant/code/klingner/wp-content/themes/forstron-child/webman-amplifier/content-shortcode-posts-wm_staff.php on line 26
    ( ! ) Error: Call to undefined function wm_schema_org() in /home/vagrant/code/klingner/wp-content/themes/forstron-child/webman-amplifier/content-shortcode-posts-wm_staff.php on line 26

    Is this no longer supported or did something change?

    Also, what if we wanted to change the theme but still wanted to use the WebMan Amplifier for the Projects and Staff and such? We want to see about switching our theme to Beaver Builder Theme.

    #20008

    Oliver Juhas
    Keymaster

    Hi vervocity,

    Please note that microformats were removed in theme version 1.8.1 in favor of plugins (please check changelog.md file in the theme directory for more info about updates).

    I suggest comparing the file in your child theme to the new one in the Forstron theme and making appropriate changes to fix the issue.

    If you want to switch a theme, all you need to do is to copy and load the forstron/setup/webman-amplifier/webman-amplifier.php file into your child theme and make appropriate changes if needed (such as removing the code no longer relevant to your new parent theme, but from my quick look I think you should be OK).

    Best regards,

    Oliver Juhas
    WebMan Design

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

You must be logged in to reply to this topic.