Problem with parent page slug only in WordPress admin

Edit. Here’s another solution to not mess with the edit slug button. The function get_sample_permalink_html in wp_admin/includes/post.php outputs the sample permalink and an edit button. It can be filtered like this: add_filter(‘get_sample_permalink_html’,’my_sample_permalink’,10,2); function my_sample_permalink ($page_link,$id){ $page = get_page($id); if($page->post_type == “page” && $page->post_parent) { $parent = get_page($page->post_parent); $page_link = preg_replace(“/(sample-permalink\”>).*?(<)/”,”$1″.home_url(“https://wordpress.stackexchange.com/”).$parent->post_name.”/$2″,$page_link); } return $page_link; } Can’t … Read more

how to show Author information in search results

It’s called Author Rich Snippets. Your link needs to look like <link href=”https://plus.google.com/115911773396772351667?rel=author”/>Your Name</a> The Simple Way To Set Up Author Rich Snippets There are a few things you need in order to step up Author Rich Snippets: A public Google+ profile. Make sure to upload a decent looking profile picture. Google will use this … Read more

WordPress SEO plugin (by Yoast) and BuddyPress [closed]

This is possible using the filter wpseo_breadcrumb_links. In this example, I’m using the functions bp_get_user_meta and bp_loggedin_user_id, adjust as needed. To check if the page is child of the Members page (in this example, ID == 2), I’m using the function has_parent grabbed from here. add_filter( ‘wpseo_breadcrumb_links’, ‘buddy_crumbs_wpse_88889’ ); function buddy_crumbs_wpse_88889( $links ) { // … Read more

Remove Yoast jQuery from front end

How this line (9th) is created within your theme code? <script type=”text/javascript” src=”https://wordpress.stackexchange.com/wp-content/themes/blankslate/js/jquery-1.11.1.min.js”></script> If it is hard-coded in header.php, then I would recommend to remove it. Scripts should be enqueued instead of hard-coding them. Next, you can de-register jquery.migrate script with the following code added to functions.php: /** * Remove jQuery migrate script */ add_filter( … Read more

Declare global var from Template File and use it in Functions.php

You can use the exact same filter in your template files. If you do need it in functions.php for any reason (maybe you have some additional processing) then you can use your own custom filter. functions.php: function my_custom_authorpage_title( $title ) { // process … return apply_filters( ‘my_title’, $title ); } add_filter( ‘wpseo_title’, ‘my_custom_authorpage_title’ ); author.php … Read more

How to Modify Breadcrumb Page Names for Specific Pages? [closed]

We generally don’t answer plugin-specific questions here so you may find more help in a Yoast-specific forum. To point you toward the right direction, though, there is a filter called wpseo_breadcrumb_output. In either a custom plugin or your theme’s functions.php file, you can add something to the effect of add_filter(‘wpseo_breadcrumb_output’, ‘change_breadcrumb_names’); function change_breadcrumb_names($output) { if(is_page(12)) … Read more