Wordpress SEO - What are you looking for?

If you're looking for answers to SEO or wordpress related questions, type in a phrase and wait for hints or click enter! The results also show links to external sources.

161 articles in the database

We do responsive elements in content

[ Article content is protected by Plagiashield ]

responsive

Inspired by yesterday's topic templateóin WP well optimized for SEO written via of all of us known to you, the Grouchy... link - and the subject of their responsiveness I decided to tackle the same subject but from websites content.

Let's start perhaps with the simplest and mostly used elements, i.e. images and video:

1. images

.css file:

img {
max-width: 100%;
}

2. HTML5 Video

.css file:

video {
max-width: 100%;
height: auto;
}

3. Youtube and Vimeo video

For display we use:

<div class="video-container">

And to the .css file we add:

.video-container {
position: relative;
padding-bottom: 56.25%;
padding-top: 30px;
height: 0;
overflow: hidden;
}

.video-container iframe,
.video-container object,
.video-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

4. Google Maps

google-maps">

.css file:

 .google-maps {
 position: relative;
 padding-bottom: 90%; // (450 ÷ 500 = 0.9 = 90%)
 height: 0;
 overflow: hidden;
 }
 .google-maps iframe {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 }

5. hiding and replacing content on mobile

The following code works with a plugin called WP Mobile Detect

After installation and configuration paste the code into functions.php file

function adaptive_content( $content ) {
if ( !in_the_loop() ) return $content;
if ( wpmd_is_phone() ){
$custom_field = str_replace( 'the_' , 'short_' , current_filter() );
$short_content = get_field($custom_field);
if ( $short_content ) return $short_content;
}
return $content;
}
add_filter( 'the_excerpt', 'adaptive_content' );
add_filter( 'the_title', 'adaptive_content' );

The code substitutes the full title and description into the shortened versions given in the fields created by plugin when the content is displayed on your phone.

Wojciech Wladzinski

O Wojciech Wladzinski

I have been dealing with SEO industry since 2008. At co day senior SEO specialist in the company Seogroup. I create and optimize large websites like and smaller websites. I am particularly fond of the environment WordPresswhich, despite popular belief, is not just a blogging platform.
  • Internal Links and Sematics

  • Link building
  • Sematics
  • Link building has never been easier. Hundreds of link possibilities in one click.
  • See

[ Article content is protected by Plagiashield ]

SEMRush - the best tool for SEO and PPC.

en_USEnglish
Read previous post:
become-author-seowordpress
Interested in writing an article?

Are you interested in writing an article on seowordpress.co.uk? Do you have knowledge about SEO and/or Wordpress? Sign up, report to me...

Close