• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Browser Tab Titles

Started by Rafa,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RafaTopic starter

I have created a few custom pages and I am trying to figure out how I can give each of these new pages a unique title. For instance, I have the following scenario:

File 1:
com/com_new_page (which includes TPL'/new_page.php

File 2:
tpl/main/new_page.php

Where would I add the seo_title() for this new page?

Thanks
  •  

PHPVibe A.

com_new_page using filters :

// SEO Filters
function modify_title( $text ) {
 return "Your title here";
}
function modify_desc( $text ) {
    return "Your description here";
}


You can check com_page or com_video to see an live example (or any com :) )

RafaTopic starter

  •  

RafaTopic starter

Can't forget to add this piece of code... Or else it won't work.

add_filter( 'phpvibe_title', 'modify_title' );
add_filter( 'phpvibe_desc', 'modify_desc' );
  •  

PHPVibe A.

Indeed, those filters need to be applied, but I touch you copied a com a already have them.

RafaTopic starter

I had not duplicated that portion of the code when creating the new pages.
I did now! and it works like a charm!

Thanks.
  •  

Similar topics (7)