Forum Replies Created

Viewing 2 replies - 91 through 92 (of 92 total)
  • Forum: Plugins
    In reply to: really remove wp version

    no need to install as plugin…
    just put this in the header.php

    remove_action(‘wp_head’, ‘wp_generator’);

    before the <? wp_header();?>

    Have similar problem right now. and a bit surprised that I cant find solution on the internet using just php code.

    Here’s the solution I made in case you still haven’t found the solution.

    <?php
    $sep = '|';
    	$spages = wp_list_pages('sort_column=menu_order&depth=1&echo=0');
    	preg_match_all('@<a href="(?<a>.*?)">(?<t>.*?)</a>@', $spages, $out);
    	$cnt_pages = count($out['a']);
    	for($i=0;$i<=$cnt_pages;++$i){
    		echo $out['t'][$i];
    		if($i<$cnt_pages-1){
    			echo $sep;
    		}
    	}
    ?>

Viewing 2 replies - 91 through 92 (of 92 total)