Forum Replies Created

Viewing 15 replies - 1 through 15 (of 71 total)
  • Thread Starter andrew-s3

    (@andrew-s3)

    Still stuck on this issue – has anyone tried or have a solution for this?

    Thread Starter andrew-s3

    (@andrew-s3)

    Does anyone know how to echo the raw data contained within a JCF field rather than wrapping it inside of HTML via do_shortcode?

    I too am also having this issue – after update all my categories under custom product taxonomies in woocommerce are no longer visible – therefore my search is not working properly on my site.

    Thread Starter andrew-s3

    (@andrew-s3)

    I’m not sure exactly what you mean by that.

    Thread Starter andrew-s3

    (@andrew-s3)

    I manually changed the entries via the database and fixed the NULL statements.

    Thread Starter andrew-s3

    (@andrew-s3)

    is there a way for me to manually enter these 3 coordinates via the database?

    Thread Starter andrew-s3

    (@andrew-s3)

    You sir are THE MAN! Thank You!

    That seemed to do the trick – amazing how it’s always something that small that causes a problem with my php…

    Thank you very much jnhghy & Andrew for your help!

    Thread Starter andrew-s3

    (@andrew-s3)

    i’ve tried different renditions of the supplied “solutions” and have yet to solve the syntax error on line 102 that continues to display.

    i’ve decided to stick with the half-solved code that requires the user to HAVE to enter something in the custom field or no title displays – i’ll just make the custom field required.

    if anyone figures out how to make it still display the title w/o the custom field as i’ve been attempting above feel free to comment.

    thanks again for all your help guys

    Thread Starter andrew-s3

    (@andrew-s3)

    I’ve tested your suggestion

    <?php
    
    // Breadcrumbs
    require_once(get_template_directory(). '/lib/breadcrumbs.php');
    
    global $post;
    
    if( is_single() ) {
    
        $title = zee_option('zee_blog_title');
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_category() ) {
    
        $title = __("Category", ZEETEXTDOMAIN) . " : " . single_cat_title("", false);
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_archive() ) {
        if (is_day()) {
            $title = __("Daily Archives", ZEETEXTDOMAIN) . " : " . get_the_date();
    
        } elseif (is_month()) {
            $title = __("Monthly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("F Y");
    
        } elseif (is_year()) {
            $title = __("Yearly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("Y");
    
        } else {
            $title = __("Blog Archives", ZEETEXTDOMAIN);
    
        }
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_tag() ) {
        $title = $return .= __("Tag", ZEETEXTDOMAIN) . " : " . single_tag_title("", false);
    } elseif ( is_author() ) {
        $title = __("Author: ", ZEETEXTDOMAIN);
    } elseif ( is_search() ) {
        $title = __("Search results for", ZEETEXTDOMAIN) . " : " . get_search_query();
    } elseif ( is_tax( 'portfolios' ) ) {
        $title = __("Portfolio", ZEETEXTDOMAIN);
    } elseif ( is_home() and !is_front_page() ) {
    
        $page = get_queried_object();
    
        if( is_null( $page ) ){
            $title = zee_option('zee_blog_title');
            $sub_title = zee_option('zee_blog_subtitle');
        } else {
    
         $ID = $page->ID;
         $title = $page->post_title;
         $sub_title = get_post_meta($ID, 'page_subtitle', true);
     }
    
    } elseif ( (is_page()) && (!is_front_page()) ) {
        $page = get_queried_object();
    
        $ID = $page->ID;
    
        $title = $page->post_title;
        $sub_title = get_post_meta($ID, 'page_subtitle', true);
    	$background = types_render_field("title-background", array("output" => "raw")); 
    
    } elseif( is_front_page() ){
    
        unset($title);
    }
    
    if (isset($title)) {
        $to_echo = '<section id="title" class="crimson" ';
        if ($background !== '') {
            $to_echo .= 'style="background:url('.$background.') top center repeat-x"';}
        $to_echo .= '>
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1>'.$title.'</h1>
        <p>'.$sub_title.'</p>
        </div>
        <div class="col-sm-6">'.zee_breadcrumb().'</div>
        </div>
        </div>
        </section>';
        echo $to_echo;
    } else { ?>
    
        <section id="title" class="crimson">
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1><?php echo $title ?></h1>
        <p><?php echo $sub_title ?></p>
        </div>
        <div class="col-sm-6"><?php zee_breadcrumb() ?></div>
        </div>
        </div>
        </section>
    <? }

    Still says I have an error on line 102

    Thread Starter andrew-s3

    (@andrew-s3)

    UPDATE –

    I changed the file to the following in order to have the else statement to still display my page title – yet it’s giving me a syntax error again at the end of the document on the server-side.

    <?php
    
    // Breadcrumbs
    require_once(get_template_directory(). '/lib/breadcrumbs.php');
    
    global $post;
    
    if( is_single() ) {
    
        $title = zee_option('zee_blog_title');
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_category() ) {
    
        $title = __("Category", ZEETEXTDOMAIN) . " : " . single_cat_title("", false);
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_archive() ) {
        if (is_day()) {
            $title = __("Daily Archives", ZEETEXTDOMAIN) . " : " . get_the_date();
    
        } elseif (is_month()) {
            $title = __("Monthly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("F Y");
    
        } elseif (is_year()) {
            $title = __("Yearly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("Y");
    
        } else {
            $title = __("Blog Archives", ZEETEXTDOMAIN);
    
        }
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_tag() ) {
        $title = $return .= __("Tag", ZEETEXTDOMAIN) . " : " . single_tag_title("", false);
    } elseif ( is_author() ) {
        $title = __("Author: ", ZEETEXTDOMAIN);
    } elseif ( is_search() ) {
        $title = __("Search results for", ZEETEXTDOMAIN) . " : " . get_search_query();
    } elseif ( is_tax( 'portfolios' ) ) {
        $title = __("Portfolio", ZEETEXTDOMAIN);
    } elseif ( is_home() and !is_front_page() ) {
    
        $page = get_queried_object();
    
        if( is_null( $page ) ){
            $title = zee_option('zee_blog_title');
            $sub_title = zee_option('zee_blog_subtitle');
        } else {
    
         $ID = $page->ID;
         $title = $page->post_title;
         $sub_title = get_post_meta($ID, 'page_subtitle', true);
     }
    
    } elseif ( (is_page()) && (!is_front_page()) ) {
        $page = get_queried_object();
    
        $ID = $page->ID;
    
        $title = $page->post_title;
        $sub_title = get_post_meta($ID, 'page_subtitle', true);
    	$background = types_render_field("title-background", array("output" => "raw")); 
    
    } elseif( is_front_page() ){
    
        unset($title);
    }
    
    if (isset($title)) {
        $to_echo = '<section id="title" class="crimson" ';
        if ($background !== '') {
            $to_echo .= 'style="background:url('.$background.') top center repeat-x"';
        $to_echo .= '>
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1>'.$title.'</h1>
        <p>'.$sub_title.'</p>
        </div>
        <div class="col-sm-6">'.zee_breadcrumb().'</div>
        </div>
        </div>
        </section>';
        echo $to_echo;
    } else { ?>
    
        <section id="title" class="crimson">
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1><?php echo $title ?></h1>
        <p><?php echo $sub_title ?></p>
        </div>
        <div class="col-sm-6"><?php zee_breadcrumb() ?></div>
        </div>
        </div>
        </section>
    <? } }

    The error reads –
    PHP Parse error: syntax error, unexpected $end in E:\Users\cPanel\webbetas\public_html\carne\wp-content\themes\flat-theme\sub-title.php on line 102

    Thanks again for your help in advance.

    Thread Starter andrew-s3

    (@andrew-s3)

    Andrew – Thanks for pointing that out – it seems to have fixed the syntax error.

    Though the problem now is that if nobody enters a value for $background – then the whole title no longer appears.

    would I just add an ELSE statement in there for the following minus the $background style?

    if so – what would that look like?

    here’s an example of the HTML minus the $background property added to the <section> tag.

    <section id="title" class="crimson">
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1>'.$title.'</h1>
        <p>'.$sub_title.'</p>
        </div>
        <div class="col-sm-6">'.zee_breadcrumb().'</div>
        </div>
        </div>
        </section>
    Thread Starter andrew-s3

    (@andrew-s3)

    the server error returned is –

    PHP Parse error: syntax error, unexpected $end in E:\Users\cPanel\webbetas\public_html\carne\wp-content\themes\flat-theme\sub-title.php on line 90

    and line 90 is the end of the php file.

    <?php
    
    // Breadcrumbs
    require_once(get_template_directory(). '/lib/breadcrumbs.php');
    
    global $post;
    
    if( is_single() ) {
    
        $title = zee_option('zee_blog_title');
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_category() ) {
    
        $title = __("Category", ZEETEXTDOMAIN) . " : " . single_cat_title("", false);
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_archive() ) {
        if (is_day()) {
            $title = __("Daily Archives", ZEETEXTDOMAIN) . " : " . get_the_date();
    
        } elseif (is_month()) {
            $title = __("Monthly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("F Y");
    
        } elseif (is_year()) {
            $title = __("Yearly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("Y");
    
        } else {
            $title = __("Blog Archives", ZEETEXTDOMAIN);
    
        }
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_tag() ) {
        $title = $return .= __("Tag", ZEETEXTDOMAIN) . " : " . single_tag_title("", false);
    } elseif ( is_author() ) {
        $title = __("Author: ", ZEETEXTDOMAIN);
    } elseif ( is_search() ) {
        $title = __("Search results for", ZEETEXTDOMAIN) . " : " . get_search_query();
    } elseif ( is_tax( 'portfolios' ) ) {
        $title = __("Portfolio", ZEETEXTDOMAIN);
    } elseif ( is_home() and !is_front_page() ) {
    
        $page = get_queried_object();
    
        if( is_null( $page ) ){
            $title = zee_option('zee_blog_title');
            $sub_title = zee_option('zee_blog_subtitle');
        } else {
    
         $ID = $page->ID;
         $title = $page->post_title;
         $sub_title = get_post_meta($ID, 'page_subtitle', true);
     }
    
    } elseif ( (is_page()) && (!is_front_page()) ) {
        $page = get_queried_object();
    
        $ID = $page->ID;
    
        $title = $page->post_title;
        $sub_title = get_post_meta($ID, 'page_subtitle', true);
    	$background = types_render_field("title-background", array("output" => "raw")); 
    
    } elseif( is_front_page() ){
    
        unset($title);
    }
    
    if (isset($title)) {
        $to_echo = '<section id="title" class="crimson" ';
        if ($background !== '') {
            $to_echo .= 'style="url('.$background.')"';
        $to_echo .= '>
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1>'.$title.'</h1>
        <p>'.$sub_title.'</p>
        </div>
        <div class="col-sm-6">'.zee_breadcrumb().'</div>
        </div>
        </div>
        </section>';
        echo $to_echo;
    }
    Thread Starter andrew-s3

    (@andrew-s3)

    the error being returned is the default dreamweaver return of – ‘There is a syntax error on line 90. Code hinting may not work until you fix this error.’

    [Moderator Note: No bumping, thank you.]

    Thread Starter andrew-s3

    (@andrew-s3)

    I tried the above code and was still receiving a syntax error at the end of the code.

    I need the $to_echo to happen before the <div class=”container”> – basically states if I have entered an image into the custom field for $background display the STYLE code – otherwise; don’t.

    here’s the original code in its entirety before entering in the above conditions:

    <?php
    
    // Breadcrumbs
    require_once(get_template_directory(). '/lib/breadcrumbs.php');
    
    global $post;
    
    if( is_single() ) {
    
        $title = zee_option('zee_blog_title');
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_category() ) {
    
        $title = __("Category", ZEETEXTDOMAIN) . " : " . single_cat_title("", false);
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_archive() ) {
        if (is_day()) {
            $title = __("Daily Archives", ZEETEXTDOMAIN) . " : " . get_the_date();
    
        } elseif (is_month()) {
            $title = __("Monthly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("F Y");
    
        } elseif (is_year()) {
            $title = __("Yearly Archives", ZEETEXTDOMAIN) . " : " . get_the_date("Y");
    
        } else {
            $title = __("Blog Archives", ZEETEXTDOMAIN);
    
        }
    
        $sub_title = zee_option('zee_blog_subtitle');
    
    } elseif ( is_tag() ) {
        $title = $return .= __("Tag", ZEETEXTDOMAIN) . " : " . single_tag_title("", false);
    } elseif ( is_author() ) {
        $title = __("Author: ", ZEETEXTDOMAIN);
    } elseif ( is_search() ) {
        $title = __("Search results for", ZEETEXTDOMAIN) . " : " . get_search_query();
    } elseif ( is_tax( 'portfolios' ) ) {
        $title = __("Portfolio", ZEETEXTDOMAIN);
    } elseif ( is_home() and !is_front_page() ) {
    
        $page = get_queried_object();
    
        if( is_null( $page ) ){
            $title = zee_option('zee_blog_title');
            $sub_title = zee_option('zee_blog_subtitle');
        } else {
    
         $ID = $page->ID;
         $title = $page->post_title;
         $sub_title = get_post_meta($ID, 'page_subtitle', true);
     }
    
    } elseif ( (is_page()) && (!is_front_page()) ) {
        $page = get_queried_object();
    
        $ID = $page->ID;
    
        $title = $page->post_title;
        $sub_title = get_post_meta($ID, 'page_subtitle', true);
    	$background = types_render_field("title-background", array("output" => "raw")); 
    
    } elseif( is_front_page() ){
    
        unset($title);
    }
    
    echo (isset($title) ? '
    
        <section id="title" class="crimson">
        <div class="container">
        <div class="row">
        <div class="col-sm-6">
        <h1>'.$title.'</h1>
        <p>'.$sub_title.'</p>
        </div>
        <div class="col-sm-6">'.zee_breadcrumb().'</div>
        </div>
        </div>
        </section>
    
    	' : '');

    Thanks for your help in advance

    Cais – I submitted a support ticket as that seems to be the general route everyone was taken thru to receive support.

    I just submitted it 3 minutes ago.

    I’m aware this is an old topic – but when searching google for solutions this was what was presented to me. I’m currently running the latest version of the free plugin.

Viewing 15 replies - 1 through 15 (of 71 total)