Forum Replies Created
-
AuthorPosts
-
September 23, 2018 at 2:02 pm in reply to: How do I enable widget background image customizer for custom page templates? #223378samwMemberThis reply has been marked as private.samwMember
Hi
Thanks for taking a look - I changed the header to be more SEO friendly and it resizes fine using this approach
http://keypresswp.com/full-width-responsive-header-image-lifestyle-pro/
samwMembersamwMemberHi Maddog
I cant help on the recipe side of things - but you can change the default schema for the whole theme or pages by adapting this code for your specific schema.
http://www.rfmeier.net/custom-microdata-with-genesis-2-0/
Just Used this to set the default schema for a property site to schema/estateagent - but cant set up the itemprop 🙂Its not clear how you add the new itemprops/scope to the schema once you do this in genesis- can't find any articles on setting this up anywhere
You would want something like this
<div itemscope itemtype="http://schema.org/Recipe"><h1 itemprop="name">Pita Pizza</h1>
<p>By<span itemprop="author">Mindy Pretner</span></p><div itemprop="description">
"Pita Pizza is a quick snack or meal that can
be customized to your liking!"
</div>
<div><span itemprop="recipeYield">1</span> Serving</div>
<div>
Prep Time: <time itemprop="prepTime">5 Min</time><br/>
Cook Time: <time itemprop="cookTime">15 Min</time><br/>
Ready In: <time itemprop="totalTime">20 Min</time><br/>
</div>
<div>
<h3> Ingredients</h3>-
<li itemprop="ingredients">1 pita bread round
<li itemprop="ingredients">5 ml olive oil
<li itemprop="ingredients">45 ml pizza sauce
<li itemprop="ingredients">55 g shredded mozzarella cheese
<li itemprop="ingredients">25 g sliced crimini mushrooms
<li itemprop="ingredients">0.7 g garlic salt</div>
You mentioned your rich snippets are no longer showing
Have you run the site through the Google Structured Data Testing Tool to check the schema code is seen?
http://www.google.com/webmasters/tools/richsnippets
If you can see the schema code for your site as expected, its always possible that Google has run an algorithm change that no longer means it will show the rich snippet - I see this all the time - having schema does not guarantee the search engines will show it in rich snippets - there was an overall Google update in the last week
Hope that helps and someone else will weigh in on the schema coding side of things
samwMembersamwMemberHi
For anyone who would like to have H1 Post Titles, this code added to functions worked for me.
Page Titles with or without SEO plugins seem to be showing as expected in H1
Remember, always back up functions before making any changes
/*
Changing Genesis H1 Post Titles to H2
*/
add_filter( 'genesis_post_title_output', 'ac_post_title_output', 15 );
function ac_post_title_output( $title )
{ if ( is_home() || is_archive() )
$title = sprintf( '<h1 class="entry-title">%s</h1>', apply_filters( 'genesis_post_title_text',get_the_title() ) );
return $title;
}
samwMemberThis reply has been marked as private.samwMemberThis reply has been marked as private.samwMemberHi
No cant get my brain round it either - have gone through the entire server twice - restored the site from a backup - still seeing that redirect!!!
The rewrite is happening automatically, but you shouldn’t be seeing it as a redirect… so where are the links to that folder without the trailing slash coming from?
I cannot find any links to that folder without the trailing slash!
That has to be linked from somewhere without the trailing slash, or else it wouldn’t be getting visited to be rewritten… that’s the part that I’m having trouble wrapping my brain around… no one should be visiting that folder directly that’s legit.
Agreed - that folder should not be seen at all without the trailing slash...i'm going to have to find a way to search for it in the entire database
LOL re hacking - yes, security hardening is critical these days - don't trust your hosting provider - do it yourself. Yes wasted energy..its the same in the SEO world - negative SEO is the new black! 🙂
samwMembersamwMemberHey Summer
Thanks for the detailed reply 🙂
No issue with having a trailing slash, I expect it to be there... I do have an issue that there's a redirect chain in place..
If you wanted to take a look in gmetrix.com you can see it being reported - its my primary business site that you know 🙂
mysite.com/wp-content/themes/minimum-pro
Is redirecting to
mysite.com/wp-content/themes/minimum-pro/Can't understand this...have checked all other client sites and cant see this happening anywhere else
Thanks for the explanation re index in genesis child themes - I will use htaccess.
Cheers
samwMemberHi
Thanks all - @Brad will retry this later and a redirect rule to the .htaccess rule
I have a weird redirect chain issue with the genesis child theme to resolve first
mysite.com/wp-content/themes/minimum-pro
Is redirecting to
mysite.com/wp-content/themes/minimum-pro/Note the trailing slash in part 2. No idea why theres a redirect chain as nothing on the server that's causing this. It's the first time I have seen this with any of my Genesis Sites.
@Summer - hey hope your well?
Its WP3.9 - all the WP base install does have the empty index.php its the Genesis child themes that don't - so assume this is genesis specific
samwMemberHi
Thanks for the reply
I dont want to add index.php - i want to add index.html - but i guess that work work in Genesis
To block browsing of wp-content/themes
http://www.thesitewizard.com/apache/prevent-directory-listing-htaccess.shtml
I would happily use htaccess - the block works however it creates a 404 page redirect error for wp-content/themes/mychildtheme - this is not how it should work
Thanks
samwMembersamwMemberHi
This worked for me after many hours of trying the same - BUT I am only using static pages with templates I created for this example. They are very basic templates - just full width thats it. Not tried with default template. I do have an issue with the other pages images not resizing or showing in mobile at the moment. The default bgd image works fine
`//* Minimum custom body class
function minimum_add_body_class( $classes ) {
$classes[] = 'minimum';
return $classes;
}
//* Enqueue scripts
add_action( 'wp_enqueue_scripts', 'minimum_custom_enqueue_scripts' );
function minimum_custom_enqueue_scripts() {
if ( is_page(array(3953,4034,3890))){wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' ); wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => 'http://met3.dev/wp-content/themes/minimum-pro/images/head5.jpg') );
if (is_page('4034')) :
wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => 'http://xx.dev/wp-content/themes/minimum-pro/images/head7.jpg' ) );
elseif (is_page('3890')) :
wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => 'http://xxdev/wp-content/themes/minimum-pro/images/head8.jpg' ) );
else:
wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => get_background_image() ) );
endif;
//* Add custom body class
add_filter( 'body_class', 'minimum_add_body_class' );
}}
You also need to add this class to css .minimum .site-tagline {
margin-top: 600px;
margin-top: 60rem;
}this sets the correct div to display images on the pages in the array - and only for the pages in the array so the rest of the site stays the same
I also commented all of this out of front-page.php which was odd as im using a static page for home but guess its still calling stuff out of this
//* Enqueue scripts
/*add_action( 'wp_enqueue_scripts', 'minimum_front_page_enqueue_scripts' );
function minimum_front_page_enqueue_scripts() {//* Load scripts only if custom background is being used
if ( ! get_background_image() )
return;//* Enqueue Backstretch scripts
/*wp_enqueue_script( 'minimum-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'minimum-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'minimum-backstretch' ), '1.0.0' );wp_localize_script( 'minimum-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', get_background_image() ) ) );
//* Add custom body class
add_filter( 'body_class', 'minimum_add_body_class' );}*/
//* Minimum custom body class
/*function minimum_add_body_class( $classes ) {
$classes[] = 'minimum';
return $classes;
}*/HTH
samwMembersamwMemberJune 1, 2014 at 7:08 am in reply to: Attention Yoast users – WordPress SEO – re: focus keyword on html 5 sites #107731samwMemberHi
I had a few issues with it after downloading a site and changing theme to Enterprise Pro
Try uninstalling and reinstalling. All my data was still there. Tested by changing focus keyword, hitting update and it does save but only if you hit update post - not by typing in the focus keyword as normal - give it a go. Im working on local dev. Maybe its a theme specific clash??
Hope this helps
samwMemberHey Neil - I managed to do this via CSS - thanks for your offer of help - no doubt this is not the "best" way but it works
after a lot of hunting around using CSS - there's a couple of ways to achieve this. No idea of the implications for mobile responsiveness or site load, so if anyone wishes to comment feel free:
Here's how to add full browser width bars to any part of your theme/page etc using CSS & Divs - just style accordingly
Method A - use the section class in CSS - as seen here http://codepen.io/receter/pen/uBJaK
I haven't worked out how to get my text to format as I would like yet - centred in section but here's my css
.section {
margin: 0 auto;
width: 25rem;
background: white; (background middle if you extend text)
padding: 20px;
}
.section h2 {
color: white;
position: relative;
background: white; (this changes the middle of box colour behind text)
}
.section h2:before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: -9999px;
right: 0;
border-left: 9999px solid red; (this changes box colour on left)
box-shadow: 9999px 0 0 red; (this changes box colour on right)
}Method B - Same principle different approach http://www.sitepoint.com/css-extend-full-width-bars/
My css here
.extendfull, .extendleft
{
padding-left: 3000px;
margin-left: -3000px;
}.extendfull, .extendright
{ background:#000;
padding-right: 3000px;
margin-right: -3000px;
}
.extendfull body {
overflow-x: hidden;
}Voila - coloured full width divs to use anywhere you fancy
-
AuthorPosts