Tagged: x
-
AuthorPosts
-
October 18, 2016 at 5:22 pm #1221425
I uploaded the child theme for ethos and copied the wp-header.php file path to it, then added the following code to allow me to add revolution sliders to the category pages:
<?php if ( is_category('3') ): echo do_shortcode('[rev_slider alias="photographyslider"]'); elseif ( is_category('33') ): echo do_shortcode('[rev_slider alias="fashion-slider"]'); elseif ( is_category('2') ): echo do_shortcode('[rev_slider alias="travel-slider"]'); elseif ( is_category('4') ): echo do_shortcode('[rev_slider alias="technology-slider"]'); elseif ( is_category('31') ): echo do_shortcode('[rev_slider alias="music-slider"]'); elseif ( is_category('32') ): echo do_shortcode('[rev_slider alias="food-slider"]'); elseif ( is_category('72') ): echo do_shortcode('[rev_slider alias="photos-of-the-week-slider"]'); endif; ?>
I didn’t have this issue before installing the child theme and adding this customization. Open Graph is turned off in the customization>social setting, and I’ve tried deleting and re-installing the Yoast SEO plugin several times as well as deactivating and reactivating all plguins.
Facebook debugger says this for the following link: http://www.thefoxmagazine.com/travel/its-better-in-the-bahamas/
Inferred Property
The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property
The ‘og:url’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property
The ‘og:title’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property
The ‘og:description’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property
The ‘og:image’ property should be explicitly provided, even if a value can be inferred from other tags.However, when I inspect and look into the HTML I see that Yoast SEO is placing the og tags in the body of the html instead of the head as it should. Before this occured it showed that the articles were in maintenance mode when shared on Facebook? I am very confused and have been trying to solve this issue for two days. All help is appreciated!
October 18, 2016 at 6:07 pm #1221444Update: I successfully debugged maintenance mode issue, but the major issue is still destroying my soul and website
October 19, 2016 at 1:16 am #1221880Hi there,
I have checked and I can see the og title, description etc within the head tag – http://prntscr.com/cw44yq
So it should not cause any issue.
Cheers!
October 19, 2016 at 10:29 pm #1223295That is the case on the homepage, but not the case on category pages. Check the screenshot:
October 19, 2016 at 10:53 pm #1223313It seems as if something is placing incorrect og tags in the beginning of the html which is forcing yoast seo to place them in the body on category pages, and this only occurs when the child theme is activated. This is over my head in terms of coding abilities to solve the issue and I am SO CONFUSED haha
October 20, 2016 at 1:39 am #1223436Hello There,
Would you mind sharing the contents of the wp-header.php file present in your child theme? The original code should be this:
<?php // ============================================================================= // VIEWS/ETHOS/WP-HEADER.PHP // ----------------------------------------------------------------------------- // Header output for Ethos. // ============================================================================= ?> <?php x_get_view( 'global', '_header' ); ?> <?php x_get_view( 'global', '_slider-above' ); ?> <header class="<?php x_masthead_class(); ?>" role="banner"> <?php x_get_view( 'ethos', '_post', 'carousel' ); ?> <?php x_get_view( 'global', '_topbar' ); ?> <?php x_get_view( 'global', '_navbar' ); ?> <?php x_get_view( 'ethos', '_breadcrumbs' ); ?> </header> <?php x_get_view( 'global', '_slider-below' ); ?> <?php x_get_view( 'ethos', '_landmark-header' ); ?>
You can only add some lines but should not remove any of those lines.
Please let us know how it goes.
October 20, 2016 at 3:22 pm #1224425This is the php file in the child theme:
<?php // ============================================================================= // VIEWS/ETHOS/WP-HEADER.PHP // ----------------------------------------------------------------------------- // Header output for Ethos. // ============================================================================= ?> <?php x_get_view( 'global', '_header' ); ?> <?php x_get_view( 'global', '_slider-above' ); ?> <header class="<?php x_masthead_class(); ?>" role="banner"> <?php x_get_view( 'ethos', '_post', 'carousel' ); ?> <?php x_get_view( 'global', '_topbar' ); ?> <?php x_get_view( 'global', '_navbar' ); ?> <?php x_get_view( 'ethos', '_breadcrumbs' ); ?> </header> <?php x_get_view( 'global', '_slider-below' ); ?> <?php x_get_view( 'ethos', '_landmark-header' ); ?> // Revolution Slider output on Category pages <?php if ( is_category('3') ): echo do_shortcode('[rev_slider alias="photographyslider"]'); elseif ( is_category('33') ): echo do_shortcode('[rev_slider alias="fashion-slider"]'); elseif ( is_category('2') ): echo do_shortcode('[rev_slider alias="travel-slider"]'); elseif ( is_category('4') ): echo do_shortcode('[rev_slider alias="technology-slider"]'); elseif ( is_category('31') ): echo do_shortcode('[rev_slider alias="music-slider"]'); elseif ( is_category('32') ): echo do_shortcode('[rev_slider alias="food-slider"]'); elseif ( is_category('72') ): echo do_shortcode('[rev_slider alias="photos-of-the-week-slider"]'); endif; ?>
October 20, 2016 at 9:56 pm #1224871Hello There,
Thanks for providing the information. I have previewed the source of the page and here is what I’ve got;
http://prntscr.com/cwy0bwI do not see any issue at all. I have checked the Facebook debugger and no warnings either.
http://prntscr.com/cwy0kwHope this helps.
-
AuthorPosts