load plugin in code snippet
load plugin in code snippet
load plugin in code snippet
There are several options you have. You can write your own excerpt, or just use the tools which WordPress offers to you. There are three options you have: Use WordPress core function the_excerpt(); Use WordPress core function get_the_excerpt(); Use WordPress filter wp_trim_excerpt(); The easiest and propably most fitting for you is the first one. <?php … Read more
Failed to load resource: the server responded with a status of 500 () post.php
Trying to retrieve meta values from three different meta keys and display in rows
I can’t find any documentation that will allow adding any tag attributes to the wp_editor except for the id. You’ve got two options that I can think of. The first is to include a jQuery dependent (or not) javascript file which will add the required attribute to the editor textarea after the DOM is fully … Read more
From an example in the Developer Reference: To get the id of the inserted object use $wpdb->insert_id; global $wpdb; $table = $wpdb->prefix.’you_table_name’; $data = array(‘column1’ => ‘data one’, ‘column2’ => 123); $format = array(‘%s’,’%d’); $wpdb->insert($table,$data,$format); $my_id = $wpdb->insert_id;
Without seeing your complete code, it’s a bit difficult to answer. Also it’s a big vague when you say that it’s not calling the function (are you getting any errors / warnings?) If you’ve got error reporting turned off, please turn it on. Also, try this: require_once(‘reviews.php’); reviewsPanel(); If the file is not included, “require” … Read more
Change custom rewrite rule when permalink is updated/changed
I found the solution. First, in functions.php: function mg_news_pagination_rewrite() { add_rewrite_rule(get_option(‘category_base’).’/page/?([0-9]{1,})/?$’, ‘index.php? pagename=”.get_option(“category_base’).’&paged=$matches[1]’, ‘top’); } add_action(‘init’, ‘mg_news_pagination_rewrite’); and then in wordpress, settings> Permalinks changes must be saved
Change headers for one custom PHP file