Using Custom Value Options in PHP

use get_post_meta($post->ID, ‘your key’, true); instead of get_meta(); compare values like $developing = get_post_meta($post->ID, ‘developing’, true); if ($developing == ‘value’) { // value is matched } elseif ($developing == ‘value2’) { // value 2 is matched } else { // not matched }

Remove submenu item from list

Use the API functions remove_menu_page and remove_submenu_page to remove menu items rather than manipulating global variables. This will remove the themes page under appearance: function wpa_remove_themes_submenu() { remove_submenu_page( ‘themes.php’, ‘themes.php’ ); } add_action( ‘admin_menu’, ‘wpa_remove_themes_submenu’, 999 );

WordPress custom taxonomy

get_terms(); accept include as an array, you are trying with a string term id instead of array, try this $parent_terms = get_terms($taxonomyName, array(‘include’ => array(’67’), ‘orderby’ => ‘slug’, ‘hide_empty’ => false));

How to track who has deleted files

WordPress does not log anything natively. Closest it has to such functionality are just post revisions and ability to enable logging of PHP errors. There are plugins around to log events, but since you hadn’t one installed in advance it won’t help you retroactively. If you think it was from action by logged in user … Read more

Adding custom url to readmore link using get_permalink()

I suspect the issue is that $recipe_url is undefined in the portion you’re trying to echo it. Can you post a link to the full code of recipe_options.php? Use pastebin or something. Try: href=”https://wordpress.stackexchange.com/questions/114230/<?php $recipe_detail_xml = get_post_meta($post->ID,”recipe_detail_xml’, true); $cp_recipe_xml = new DOMDocument (); $cp_recipe_xml->loadXML ( $recipe_detail_xml ); $recipe_url = find_xml_value($cp_recipe_xml->documentElement,’recipe_url’); echo $recipe_url ; ?>”

How to make changes to style.php [closed]

To remove the style without modifying the original code you can try add this to your style.css .comment.yes { background: none !important; } This will add a new style for that class. The !important part tells the browser not to let another style over-ride that line.

How to check if a category has a parent and child categories?

First of all consider that if the category exists, term_exists function return an array, not a term id. See Codex. So: $term_ids = array(); $term = term_exists(‘categoryone’, ‘category’, 0); if ( is_array($term) && isset($term[‘term_id’]) ) { // term exists as parent cat $term_ids[] = $term[‘term_id’]; // get all the children of the categories $children = … Read more