Page title is showing category name as well in the google search results
Page title is showing category name as well in the google search results
Page title is showing category name as well in the google search results
I’m supposing we are talking about the tab title, if so its possible but not conventional, if is the page title, the code is almost the same and its feasible. In this last case WordPress doesn’t have a breadcrumb per say, we have to make a custom one, nevertheless Woocommerce has one. If Woocommerce is … Read more
Set a maxlength for the title input in a custom post type
In the theme’s header.php look for the <title> tag. You’ll probably find something like: <title><?php bloginfo(‘name’); wp_title(); ?></title> The wp_title() function spits out the blog name now so you can just remove the bloginfo() bit.
Try changing this: add_filter( ‘the_title’, ‘myfunction’); to this: add_filter( ‘the_title’, ‘myfunction’ ); (If this is indeed your problem it is likely an issue of copy/pasting code from a tutorial with curly quotes in place of standard single-quote marks.) p.s. prefix your function name with your Plugin slug. “myfunction” is far too generic.
You are correct in your thinking that because the loop evaluates after the header you will not be able to get the contents of the loop there. The easiest way to do this is probably with jQuery. Something like this: <script type=”text/javascript”> $(document).ready(function() { document.title=”blah”; }); </script> Place this code in your loop, and the … Read more
It’s been a while since I’ve asked this, and I’ve built several themes in that timeframe. The answer I’ve come up with is “use the filter”. There is no limitation to doing this, and it makes other developers’ jobs much easier, as they only need to filter the output (vs. trying to do output buffering). … Read more
EDIT: Disable magic_quotes_gpc in your server. try adding in .HTACCESS file (if you on shared hosting): php_flag magic_quotes_gpc off If you’ll get 500 server error after you added it – delete it and put this: ini_set (‘magic_quotes_gpc’, 0); in theme’s functions.php file. And with function bellow check is it on. You can create php file … Read more
function transaction_title( $title ) { if ( ‘transaction’ == get_current_screen()->post_type && ” == $title ) { return ‘Transaction ‘.uniqid(); } // else return the normal title else { return $title; } } add_filter( ‘title_save_pre’, ‘transaction_title’ );
In your header.php file, replace this line: <p id=”logo” class=”h1″><a href=”https://wordpress.stackexchange.com/questions/87084/<?php echo home_url(); ?>” rel=”nofollow”><?php bloginfo(‘name’); ?></a></p> with your custom line: <p id=”logo><h1>This is a<br /><span id=”customtitle”>Big title</span></h1></p>