andrew-s3
Forum Replies Created
-
Forum: Plugins
In reply to: [Just Custom Fields] display raw value without surrounding HTMLStill stuck on this issue – has anyone tried or have a solution for this?
Forum: Plugins
In reply to: [Just Custom Fields] display raw value without surrounding HTMLDoes anyone know how to echo the raw data contained within a JCF field rather than wrapping it inside of HTML via do_shortcode?
Forum: Plugins
In reply to: [Search Everything] Custom taxonomy terms not includedI 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.
Forum: Plugins
In reply to: [Post Types Order] 500 Error When Plugin InstallsI’m not sure exactly what you mean by that.
I manually changed the entries via the database and fixed the NULL statements.
is there a way for me to manually enter these 3 coordinates via the database?
Forum: Fixing WordPress
In reply to: Background Query not WorkingYou 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!
Forum: Fixing WordPress
In reply to: Background Query not Workingi’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
Forum: Fixing WordPress
In reply to: Background Query not WorkingI’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
Forum: Fixing WordPress
In reply to: Background Query not WorkingUPDATE –
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 102Thanks again for your help in advance.
Forum: Fixing WordPress
In reply to: Background Query not WorkingAndrew – 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>
Forum: Fixing WordPress
In reply to: Background Query not Workingthe 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; }
Forum: Fixing WordPress
In reply to: Background Query not Workingthe 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.]
Forum: Fixing WordPress
In reply to: Background Query not WorkingI 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.