Hoi,
Ik heb een website overgenomen en daar op werd All in One SEO plugin gebruikt. Deze leek goed te werken. Omdat ik voorkeur heb voor Yoast SEO plugin heb ik volgens de migratieprocedure nu Yoast SEO er op staan.
Het theme reageert echter niet op de instellingen; zowel op de index als post worden de titles niet aangepast bv.
Het gaat om de site: http://bit.ly/OB0YkL
Iemand een idee? Ik zou er erg mee geholpen zijn. Theme = Sampression Lite theme
- WP Theme pakt Yoast SEO instellingen niet
-
19-03-2014, 10:03 #1
- Berichten
- 951
- Lid sinds
- 17 Jaar
WP Theme pakt Yoast SEO instellingen niet
-
19-03-2014, 10:17 #2
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Yoast SEO > Titels & Meta's > Forceer herschrijven van titels
-
19-03-2014, 10:25 #3
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Hoi Mick, bedankt voor je reactie
Dat had ik als gokje ook geprobeerd maar lijkt niet te werken helaas :(
-
19-03-2014, 10:27 #4
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Kun je eens de header.php van je thema delen? Waarschijnlijk zullen we daar dan een kleine modificatie moeten doen.
-
19-03-2014, 10:29 #5
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Jazeker :)
<?php/**
* The Header for our theme.
*
* Displays all of the <head> section and everything untill Primary Navigation
*
* @package Sampression-Lite
* @since Sampression Lite 1.0
*/
?>
<!doctype html>
<!--[if IE 6 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<?php
/** sampression hooks **/
// Metas
do_action( 'sampression_meta' );
// Title
do_action( 'sampression_title' );
// Favicons
do_action( 'sampression_favicon' );
// CSS
do_action( 'sampression_styles' );
// Custom header styles
do_action('sampression_custom_header_style');
// Links
do_action( 'sampression_links' );
wp_head();
?>
</head>
<body <?php body_class('top'); ?>>
<header id="header">
<div class="container">
<div class="columns nine">
<?php
if(!get_option('opt_sam_use_logo') || get_option('opt_sam_use_logo') == 'no') {
do_action('sampression_logo');
}
?>
<div class="logo-txt">
<h1 class="site-title" id="site-title">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<?php bloginfo( 'name' ); ?>
</a>
</h1>
<h2 id="site-description" class="site-description"><?php bloginfo( 'description' ); ?></h2>
</div>Alle parkings op 1 pagina. Goede of slechte ervaring met een parking? Deel je ervaringen!
</div>
<div class="columns seven">
<nav id="top-nav">
<?php
//Check if the Custom Navigation is available
if ( has_nav_menu('top-menu') ) {
wp_nav_menu( array (
'theme_location' => 'top-menu',
'container' => '',
'menu_class' => 'top-menu clearfix',
'depth' => 0, // set to 1 to disable dropdowns
'fallback_cb' => false
));
} else {
// Otherwise list the Pages
?>
<ul class="top-menu clearfix">
<?php wp_list_pages('title_li=&depth=0'); ?>
</ul>
<?php
} ?>
</nav>
<div id="top-nav-mobile">
<?php /* $args = array(
'depth' => 0,
'child_of' => 0,
'selected' => 0,
'echo' => 1,
'name' => 'page_id');
wp_dropdown_pages( $args ); */
?>
</div>
<!-- #top-nav -->
<div id="interaction-sec" class="clearfix <?php echo getnoofclass(); ?>">
<?php get_search_form(); ?>
<ul class="sm-top">
<?php // Being Social
//Facebook
if( get_option( 'opt_get_facebook' ) !=''){ ?>
<li class="sm-top-fb"><a href="<?php echo stripslashes(get_option( 'opt_get_facebook' )); ?>" target="_blank">Facebook</a></li>
<?php }
// Twitter
if( get_option( 'opt_get_twitter' ) !='') {
?>
<li class="sm-top-tw"><a href="<?php echo stripslashes(get_option( 'opt_get_twitter') ); ?>" target="_blank">Twitter</a></li>
<?php }
// Google plus
if( get_option( 'opt_get_gplus' ) !='') {
?>
<li class="sm-top-gplus"><a href="<?php echo stripslashes(get_option( 'opt_get_gplus') ); ?>" target="_blank">Google Plus</a></li>
<?php }
// Youtube
if( get_option( 'opt_get_youtube' ) !='' ) {
?>
<li class="sm-top-youtube"><a href="<?php echo stripslashes(get_option( 'opt_get_youtube') ); ?>" target="_blank">YouTube</a></li>
<?php } ?>
</ul>
<!-- .sm-top -->
</div>
<!-- #interaction-sec -->
</div>
<?php $header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
<?php endif; ?>
</div>
</header>
<!-- #header -->
<!-- Filter the Post by Category: We are using Isotop (http://isotope.metafizzy.co/) for Filtering: An exquisite jQuery plugin for magical layouts -->
<?php if(is_home()): ?>
<span id="primary-nav-scroll"></span>
<nav id="primary-nav">
<div class="container">
<a href="#" id="btn-nav-opt">show/hide</a>
<div class="columns sixteen">
<div class="nav-label"><?php _e('Zoek op:','sampression'); ?></div>
<ul class="nav-listing clearfix">
<li><a href="#" data-filter="*" class="selected"><span></span><?php _e('Toon alle parkings','sampression'); ?></a></li>
<?php
/*to exclude some categories */
$args = array();
/* $args = array(
'exclude'=> array( get_cat_ID('aciform'), get_cat_ID('alignment'), get_cat_ID('antiquarianism')) // exclude by category slug
'exclude'=> array( 1, 2, 3) //exclude by category id
); */
$categories = get_categories($args);
$categories = get_categories();
foreach($categories as $category):
?>
<li><a href="javascript:void(0);" data-filter=".<?php echo $category->slug; ?>" id="<?php echo $category->slug; ?>" class="filter-data"><span></span><?php echo $category->name; ?></a></li>
<?php
endforeach;
?>
</ul>
<!-- Check Viewport: If the normal design couldn't fit with viewport, the Categories will appear via CSS with Select Menu form -->
<select name="get-cats" id="get-cats">
<option value="*">Show all</option>
<?php
foreach($categories as $category):
?>
<option value=".<?php echo $category->slug; ?>"><?php echo $category->name; ?></option>
<?php
endforeach;
?>
</select>
</div>
</div>
</nav>
<!-- #primary-nav -->
<?php endif; ?>
<div id="content-wrapper">
<div class="container">
-
19-03-2014, 10:34 #6
- Berichten
- 1.454
- Lid sinds
- 14 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Ik weet niet zeker of het gaat werken maar vervang
Code:// Title do_action( 'sampression_title' );
Code:<title><?php wp_title(''); ?></title>
-
19-03-2014, 10:35 #7
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Kun je via PM anders even een linkje sturen naar je thema?
De <title> wordt namelijk aangeroepen viaCode:do_action( 'sampression_title' );
Het juiste is:
Code:<title><?php wp_title(''); ?></title>
-
19-03-2014, 10:44 #8
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Via PM heb ik het thema ontvangen.
Code:/includes/functions.php /** * Displays title. @uses wp_title() */ add_action( 'sampression_title', 'sampression_title' ); function sampression_title() { ?> <title> <?php wp_title( '|', true, 'right' ); ?> // AANPASSEN </title> <?php } add_filter( 'wp_title', 'sampression_filter_wp_title' ); function sampression_filter_wp_title() { // Print the <title> tag based on what is being viewed. global $page, $paged; // Add the blog name. bloginfo( 'name' ); // Add the blog description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ){ echo " | $site_description"; } }
Code:<?php wp_title(''); ?>
Je kunt dit ook in header.php doen, door de do_action te vervangen. Zoals in de vorige 2 posts beschreven. Dit is simpeler, maar ik vertel dit er even bij mocht je een child thema willen maken.
Mocht je willen dat dit altijd overschreven blijft bij thema updates, dan zou je een child theme moeten maken (of laten maken). Hierbij kunnen je dan de sampression_title() functie 'overschrijven'. Je past echter niets aan in het originele thema, waardoor je gewoon altijd het thema kunt updaten.Laatst aangepast door Mick V : 19-03-2014 om 10:50
-
19-03-2014, 10:48 #9
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Bedankt beiden :)
Echter, als ik letterlijk de vervanging doe doe Marcel voorstelt dan gaat de site op helemaal op wit :) Dus moet ik ergens anders nog iets anapassen, of moet er een ; meer of minder of iets dergelijks? Dank tot zover.
-
19-03-2014, 10:54 #10
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
edit. oh nee
-
19-03-2014, 10:57 #11
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Het makkelijkste is om het in header.php aan te passen. Ik heb echter ook de oplossing van functions.php hier geplaatst, mochten er mensen met hetzelfde probleem zijn (in de toekomst). Wanneer je een child theme (zoals uitgelegd in mijn vorige post) gebruikt, dan is dit de beste manier. ;-)
-
19-03-2014, 11:00 #12
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Oke, ja als ik exact vervang wat Marcel zegt te vervangen ziet het er zo uit, maar dan werkt de site niet meer. Moet ik // Title laten staan misschien?
<?php/**
* The Header for our theme.
*
* Displays all of the <head> section and everything untill Primary Navigation
*
* @package Sampression-Lite
* @since Sampression Lite 1.0
*/
?>
<!doctype html>
<!--[if IE 6 ]> <html <?php language_attributes(); ?> class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html <?php language_attributes(); ?> class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html <?php language_attributes(); ?> class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html <?php language_attributes(); ?> class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes(); ?> class="no-js"> <!--<![endif]-->
<head>
<?php
/** sampression hooks **/
// Metas
do_action( 'sampression_meta' );
<title><?php wp_title(''); ?></title>
// Favicons
do_action( 'sampression_favicon' );
// CSS
do_action( 'sampression_styles' );
// Custom header styles
do_action('sampression_custom_header_style');
// Links
do_action( 'sampression_links' );
wp_head();
?>
</head>
-
19-03-2014, 11:02 #13
- Berichten
- 30
- Lid sinds
- 11 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Je plaatst het tussen <?php ?> tags. Plaats je aanpassing eens direct onder <head>. Hiermee zou het opgelost moeten zijn.
-
19-03-2014, 11:06 #14
- Berichten
- 951
- Lid sinds
- 17 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
yeah! :)
Super bedankt Mick en Marcel :)
-
19-03-2014, 11:13 #15
- Berichten
- 1.454
- Lid sinds
- 14 Jaar
Re: WP Theme pakt Yoast SEO instellingen niet
Graag gedaan, fijn dat het is opgelost.
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic