Can i add custom code in Source in specific page, Header from function.php?

You can add conditions in you function if you want to add icons like this method you mentioned in question. function hook_link() { global $post; if ($post->post_type == ‘page’ && $post->ID == ‘whatever page id’) { echo ‘<link href=”http://buhehe.de/wp-content/uploads/2017/12/Buhehe.ico” rel=”shortcut icon” type=”image/x-icon”>’; } ?> <?php } add_action(‘wp_head’, ‘hook_link’); to check page or post etc you … Read more

WordPress CPT Url metabox collection

you can add a parameter with a new rewrite rule like that : add_action(“init”, function () { add_rewrite_tag(“%countryName%”, “([^&]+)”); add_rewrite_rule( “^company/([^/]*)/country/([^/]*)/?” , ‘index.php?company=$matches[1]&countryName=$matches[2]’ , “top” ); }); After adding this code, flush the rewrite rules of WordPress. Then you can use URL like http://example.com/company/company-abc/country/UK And then in the template, you retrieve the parameter with get_query_var(“countryName”, … Read more

How to add php plugin code in theme

If you, for some reason, don’t want to use the shortcode ([ratings]), you can always use the_ratings() directly in your template. Make sure you are within the loop so it’ll be able to identify the correct post ID for you. If you want to use it outside the loop, you can pass your ID manually. … Read more