我有子菜单菜单;当我点击菜单时,它不应该打开,因为它有wordpress中的子菜单

时间:2016-10-07 15:08:13

标签: wordpress

我的问题是

我有子菜单菜单;当我点击菜单时,它不应该打开,因为它有子菜单;在wordpress中

见前

  

块引用

https://wordpress.org/support/;当我点击支持它打开,但它有两个子菜单论坛&文件; 我的简单问题是当我点击菜单时它不应该发生,因为它有两个子菜单,它应该在点击子菜单时打开

1 个答案:

答案 0 :(得分:0)

  • $eyt = pathinfo($mname, PATHINFO_EXTENSION); //get image extension if($eyt=='jpg' || $eyt=='jpeg' || $eyt=='JPG' || $eyt=='JPEG') { $sr=imagecreatefromjpeg('media/'.$mname.''); } if($eyt=='png' || $eyt=='PNG') { $sr=imagecreatefrompng('media/'.$mname.''); } if($eyt=='gif' || $eyt=='GIF') { $sr=imagecreatefromgif('media/'.$mname.''); } $matrix = array( array(-1, -1, -1), array(-1, 16, -1), array(-1, -1, -1), ); $divisor = array_sum(array_map('array_sum', $matrix)); $offset = 0; imageconvolution($sr, $matrix, $divisor, $offset); //output what i tried took the output code from a stackoverflow post tried to edit it to my format but no result if($eyt=='jpg' || $eyt=='jpeg' || $eyt=='JPG' || $eyt=='JPEG') { ob_start(); imagejpeg($sr); $raw = ob_get_clean(); $er= 'data:image/jpg;base64,' . base64_encode( $raw ) . ''; } if($eyt=='png' || $eyt=='PNG') { ob_start(); imagepng($sr); $raw = ob_get_clean(); $er= 'data:image/png;base64,' . base64_encode( $raw ) . ''; } if($eyt=='gif' || $eyt=='GIF') { ob_start(); imagegif($sr); $raw = ob_get_clean(); $er= 'data:image/gif;base64,' . base64_encode( $raw ) . ''; } <img class="img-responsive pad tyi abn" src="media/<?php echo $er ?>" > When i check my source code this is what i get <img src="media/data:image/jpg;base64," . base64_encode( $raw ) . " > 下点击wp-admin/Appearance/Menus(在左侧)
  • Custom Links字段留空
  • URL字段中,输入您希望显示的任何文字作为菜单上的主要项目
  • 接下来,将您的子菜单项(帖子/页面)添加到菜单中,并在主项目下缩进它们

这样,菜单上的主项目将无法点击,但子菜单会显示,并带有可点击的链接。