Custom Post Types, slug, archive and SEO plugins

I don’t know what content you want to insert in your archive page, but you can always use the file “archive-friends.php” as you can see in the Template Hierarchy to loop your “friends” post type. Then, to customize the SEO, I recommend you the plugin WordPress SEO by Yoast because it has a strong compatibility … Read more

Robots.txt not updating

Once I experienced the same issue, this is what I did to fix the issue. Edit the robots.txt file directly (using FTP/SSH), User-agent: * Disallow: /wp-admin/ Disallow: /wp-includes/ There are two reasons if the robots files not updated when you edited using a plugin. File permission. Some other plugin is reverting the changes. Also try … Read more

What is the best permalink structure for SEO?

@nevster, The best permalink structure for seo is /%category%/%postname%/ This permalink structure gives you the most keywords loaded into the URL of your post. Since the category that you’ve placed your post under usually relates to the post title, you will have an extra SEO benefit if other websites use that permalink structure to link … Read more

Can YOAST SEO fields be removed from custom post type [duplicate]

So as noted in the comments above, I found a solution and used this code to do it: function remove_yoast_metabox_reservations(){ remove_meta_box(‘wpseo_meta’, ‘reservation’, ‘normal’); } add_action( ‘add_meta_boxes’, ‘remove_yoast_metabox_reservations’,11 ); In this instance, “reservation” was my custom post type. And “wpseo_meta” was the ID of the metabox. So the same code can be used on any meta … Read more

Add tags to the section via functions.php

The hook you’re looking for is specifically wp_head which could look something like this: function theme_xyz_header_metadata() { // Post object if needed // global $post; // Page conditional if needed // if( is_page() ){} ?> <meta name=”abc” content=”xyz” /> <?php } add_action( ‘wp_head’, ‘theme_xyz_header_metadata’ ); I believe in the long run though, since WordPress is … Read more

How Do I Set the Page Title Dynamically?

There is no documentation on it but you could always apply a filter to the_title like this: add_filter(‘the_title’,’some_callback’); function some_callback($data){ global $post; // where $data would be string(#) “current title” // Example: // (you would want to change $post->ID to however you are getting the book order #, // but you can see how it … Read more

techhipbettruvabetnorabahisbahis forumutaraftarium24eduedusedusedueduedusedusedusedusedu