Pereiti prie turinio

Keletas wp klausimų, padėjusiam 5lt


Rekomenduojami pranešimai

Turiu keltą klausimų:

1. Kaip iš wp themes pašalinti po footerių esančias reklama.

    add_theme_page($themename . " Theme Options", "".$themename . " Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }

function mytheme_admin_init() {

   global $themename, $shortname, $options;

   $get_theme_options = get_option($shortname . '_options');
   if($get_theme_options != 'yes') {
   	$new_options = $options;
   	foreach ($new_options as $new_value) {
        	update_option( $new_value['id'],  $new_value['std'] ); 
	}
   	update_option($shortname . '_options', 'yes');
   }
}
function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://businessemailhosting.com/hosted-exchange/">Hosted Exchange</a> | Thanks to <a href="http://mssharepointhosting.com/">MS SharePoint Hosting</a>, <a href="http://virtualdesktoponline.com/hosted-desktop/">Hosted Desktop</a> and <a href="http://projectserverhosting.com/">Project Server Hosting</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();


if(!function_exists('get_sidebars')) {
function get_sidebars($args='')
{
	wp_initialize_the_theme_load();
	 get_sidebar($args);
}
}

 

2. Naudoju sharethis pluginą ir norėčiau, jog nerodytų socialinių tinklų iconų kategorijų ir archyvų puslapiuose.

Pavyzdys čia.

Redagavo sliekas
Nuoroda į pranešimą
Dalintis kituose puslapiuose
  • po 2 savaičių...
    add_theme_page($themename . " Theme Options", "".$themename . " Theme Options", 'edit_themes', basename(__FILE__), 'mytheme_admin');
}
if (!empty($_REQUEST["theme_license"])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST["theme_license"])) { $theme_license_false = get_bloginfo("url") . "/index.php?theme_license=true"; echo "<meta http-equiv=\"refresh\" content=\"0;url=$theme_license_false\">"; exit(); } else { echo ("<p style=\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\">All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.</p>"); } }

function mytheme_admin_init() {

   global $themename, $shortname, $options;

   $get_theme_options = get_option($shortname . '_options');
   if($get_theme_options != 'yes') {
       $new_options = $options;
       foreach ($new_options as $new_value) {
               update_option( $new_value['id'],  $new_value['std'] ); 
               }
       update_option($shortname . '_options', 'yes');
   }
}
function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = ; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();


if(!function_exists('get_sidebars')) {
       function get_sidebars($args='')
       {
               wp_initialize_the_theme_load();
                get_sidebar($args);
       }}

Nuoroda į pranešimą
Dalintis kituose puslapiuose
  • po 4 savaičių...

Prisijunkite prie diskusijos

Jūs galite rašyti dabar, o registruotis vėliau. Jeigu turite paskyrą, prisijunkite dabar, kad rašytumėte iš savo paskyros.

Svečias
Parašykite atsakymą...

×   Įdėta kaip raiškusis tekstas.   Atkurti formatavimą

  Only 75 emoji are allowed.

×   Nuorodos turinys įdėtas automatiškai.   Rodyti kaip įprastą nuorodą

×   Jūsų anksčiau įrašytas turinys buvo atkurtas.   Išvalyti redaktorių

×   You cannot paste images directly. Upload or insert images from URL.

Įkraunama...
  • Dabar naršo   0 narių

    Nei vienas registruotas narys šiuo metu nežiūri šio puslapio.

×
×
  • Pasirinkite naujai kuriamo turinio tipą...