wish to show page extension.php and post extension.html

Posted in: Newspaper
Post count: 6

wish to show wordpress pages extension.php and all post extension is .html while we can sent .html for post from permalink section. right now i want to set our pages extenstion .php so please guide me.

Thanks
shyam

Post count: 22421

Hello,

Please provide more details to what you want to achieve so I can provide a proper answer.

Thank you!

Post count: 6

hi Bogdan
actually my previous blog’s pages such as ( about us, contact, and many more)having .php extension and the article’s single page having .html extension. so right now i am converting all in wordpress and desided to use wordpress newspaper theme. so by the permalink section i can set the %%post%%.html for the article single post and also wish to set pages extension is .php.

in other WordPress theme i just add this funtion to achieve this goal sucessfully
but in this theme its not working

add_action(‘init’, ‘php_page_permalink’, -1);
register_activation_hook(__FILE__, ‘cvf_active’);
register_deactivation_hook(__FILE__, ‘cvf_deactive’);

function php_page_permalink() {

global $wp_rewrite;

if ( !strpos($wp_rewrite->get_page_permastruct(), ‘.php’)){
$wp_rewrite->page_structure = $wp_rewrite->page_structure . ‘.php’;
}

}
add_filter(‘user_trailingslashit’, ‘no_page_slash’,66,2);
function no_page_slash($string, $type){

global $wp_rewrite;

if ($wp_rewrite->using_permalinks() && $wp_rewrite->use_trailing_slashes==true && $type == ‘page’){
return untrailingslashit($string);
} else {
return $string;
}

}

function cvf_active() {

global $wp_rewrite;

if ( !strpos($wp_rewrite->get_page_permastruct(), ‘.php’)){
$wp_rewrite->page_structure = $wp_rewrite->page_structure . ‘.php’;
}
$wp_rewrite->flush_rules();

}

function cvf_deactive() {

global $wp_rewrite;

$wp_rewrite->page_structure = str_replace(“.php”,””,$wp_rewrite->page_structure);
$wp_rewrite->flush_rules();

}

Plz help
Thank you

Post count: 22421

Hi,

Sorry but this represents customization and this is not covered by the theme support. We try to help out where we can but we cannot tackle time consuming tasks. Sorry
You will have to get help from a freelancer/developer on this task.

Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.