Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter lee03351

    (@lee03351)

    @johan van der Wijk:

    Thank you very much for the update! That resolved my issue too!

    Thread Starter lee03351

    (@lee03351)

    @jamesosborne
    My other webiste is expericing the exact same issue.

    Here is the error I am getting with icongnito windows when trying to connect to accounts

    Request URL: https://sitekit.withgoogle.com/v2/site-management/setup/
    Request Method: GET
    Status Code: 400 
    Remote Address: 142.251.42.241:443
    Referrer Policy: strict-origin-when-cross-origin
    lee03351

    (@lee03351)

    @changf
    I figure out and solved the issues. It’s in the excerpt of job descriptions. I have html code in the job descriptions for the layout. When “sjb_get_the_excerpt()” retrieve excerpt text, it goes right into the substr which chucked the closing html tag and cause the incorrect html display.

    Here is what I have done with the “sjb_get_the_excerpt()” code. I just rearranged it a little by stripping special characters right at the begining when “get_the_excerpt()”. Hope this helps.

        /**
         * Custom Excerpt Function.
         *
         * @since   1.0.0 
         * 
         * @param   string  $charlength     Character length.
         * @param   string  $readmore       Read more Enable.
         * @param   string  $readmore_text  Read more Text. 
         * @return  string  $excerpt        Excerpt of Job Description
         */
        function sjb_get_the_excerpt() {
            $excerpt_text = trim(preg_replace('/<a[^>]*>(.*)<\/a>/iU', '', get_the_excerpt()));
            // $excerpt_text = substr(get_the_excerpt(), 0,200);
            $excerpt_text = substr($excerpt_text, 0,200);
            $excerpt_length = strlen($excerpt_text);
    
            if($excerpt_length > '199' ){
                $excerpt_text .= '...';
            }
            $more = '<p><a href="' . get_the_permalink() . '" class="btn btn-primary">' . esc_html__('Read More', 'simple-job-board') . '</a></p>';
    
            // $excerpt = '<p>' . trim(preg_replace('/<a[^>]*>(.*)<\/a>/iU', '', $excerpt_text)) . '</p>';
            $excerpt = '<p>' . $excerpt_text . '</p>';
    
            if (FALSE !== get_option('job_post_layout_settings')) {
                $jobpost_layout_option = get_option('job_post_layout_settings');
                if ('job_post_layout_version_one' === $jobpost_layout_option)
                    $job_post_layout_version = 'v1';
    
                if ('job_post_layout_version_two' === $jobpost_layout_option)
                    $job_post_layout_version = 'v2';
            } else {
                $job_post_layout_version = 'v1';
            }
    
            if($job_post_layout_version == 'v1'){
                return apply_filters('sjb_get_the_excerpt', $excerpt . $more, $excerpt, $more);
            }
            else{
                return apply_filters('sjb_get_the_excerpt', $excerpt);
            }
        }
    lee03351

    (@lee03351)

    @changf
    I am trying to understand how this plug-in works, and it seems like something in here is causing the issues.

    <?php echo sjb_get_the_excerpt(); ?>

    lee03351

    (@lee03351)

    @changf
    Here is an example of what’s in the description:

    <ul>
     	<li>評估新技術的材料與設備,新供應商/代理權開發。</li>
     	<li>收集市場資訊,擬定業務發展計劃與競爭策略。</li>
     	<li>可配合短期國內&國外出差。</li>
     	<li>具3年以上經驗,熟悉半導體封裝製程或設備。</li>
     	<li>具備英文或日文能力。</li>
     	<li>工作地點: 於台中或台南皆可。</li>
    </ul>

    and the output

    <div class="job-description"><p>經歷 3年以上 學歷 大學、碩士 工程學科類、電機電子維護相關、日文相關科系 需求條件 評估新技術的材料與設備 … <a title="資深業務專員" class="read-mo...</p><p><a
    href=https://www.topco-global.com/jobs/zi-shen-ye-wu-zhuan-yuan/ class=" btn="" btn-primary"="">Read More</a></p><p>經歷 3年以上 學歷 大學、碩士 工程學科類、電機電子維護相關、日文相關科系 需求條件 評估新技術的材料與設備 … <a title="資深業務專員" class="read-mo...</p><p><a
    href=https://www.topco-global.com/jobs/zi-shen-ye-wu-zhuan-yuan/ class=" btn="" btn-primary"="">Read More</a></p></div>

    The issues is where “class=” it seem to miss or acting weird there.
    Is there a possibility because of the character encoding? But, if it’s encoding issue, then why are there some items are displaying fine, some don’t. That’s where I am confused.

    • This reply was modified 4 years ago by lee03351.
    lee03351

    (@lee03351)

    @ammaryounas12
    Thanks for the reply, that solved my issue!

    However, I have noticed another issue in the job listing page.
    Some of the job short description’s “Read more” button html code isn’t correct

    it gives out code like this:
    <a title="ABCD" class="read-mo...</p><p><a href=" https:="" www.123.com="" jobs="" zi-shen-ye-wu-zhuan-yuan="" "="">Read More</a>

    @jerrykza
    I have updated to SJB ver. 2.9.1, and now the custom templates what used to work doesn’t.

    Mainly, I only need to make some change in “job-application.php” template. But after the update, it’s not working anymore.

    the file is currently under: /wp-content/themes/generatepress/simple_job_board/single-jobpost folder.

    Job Page Layout:Theme Layout
    Theme Options: Classic Layout

    Am I missing anything?

    Thread Starter lee03351

    (@lee03351)

    Hi Ketan:
    [th-slider limit=”-1″] did the trick. Weird, the 1st time I have tried it, it didn’t work. I guess I probably missed something. Thank you for the support! Greatly appreciated!

    Thread Starter lee03351

    (@lee03351)

    Thanks for the quick reply.

    That’s odd. I have slides created from 1990 to 2019, but it cuts off on 2015. Wont display anything after that. Not sure if I have missed something.

    Thread Starter lee03351

    (@lee03351)

    @jamesosborne Got that all sort out after deleted the site from the property list in Google Search Console and then re-configured the plug-in in WP.

    Thank you for the support!

Viewing 11 replies - 1 through 11 (of 11 total)