Add options to WordPress backend
Add options to WordPress backend
Add options to WordPress backend
As what I’ve commented, the rawurlencode() function is the reason because WordPress have a lot of restrictions. I found that, that kind of problem will exist if you have a % percent sign (in my case, produced by the rawurlencode()) in your ‘default’ => $value. One of the solutions, encode some or the whole part … Read more
First thing get_current_theme() is deprecated since version 3.4 you need to use wp get theme() to get the current theme name. And about add_menu() you can only use it at action hook admin_bar_menu as codex say about it: This is not a function. It is a method of the $wp_admin_bar global (an instance of WP_Admin_Bar), … Read more
Yes. It is possible. Add a custom link to the href attribute of the function, maybe with attributes for the url. This parameter plan you Parse, like about the global $_GET and run your file, script etc. if it the right parameters. As example, see on the href-Parameter. I add the follow get-parameters in the … Read more
Weird slug in archives permalink
Well, you’re getting error, because your code is not correct… There is syntax error in this line (You combine string and PHP code in there…): $items .= ‘<li class=”menu-item”>echo do_shortcode( ‘[contact-form-7 id=”1323″ title=”Newsletter”]’ );</li>’; It should look like this: add_filter( ‘wp_nav_menu_items’, ‘your_custom_menu_item’, 8, 2 ); function your_custom_menu_item ( $items, $args ) { if( $args->theme_location == … Read more
got this working! here is an example of how to set up the form. <script type=”text/javascript”> jQuery(document).ready(function($) { $(‘.metabox_submit’).click(function(e) { e.preventDefault(); $(‘#publish’).click(); }); $(‘#add-row’).on(‘click’, function() { var row = $(‘.empty-row.screen-reader-text’).clone(true); row.removeClass(’empty-row screen-reader-text’); row.insertBefore(‘#repeatable-fieldset-one tbody>tr:last’); return false; }); $(‘.remove-row’).on(‘click’, function() { $(this).parents(‘tr’).remove(); return false; }); $(‘#repeatable-fieldset-one tbody’).sortable({ opacity: 0.6, revert: true, cursor: ‘move’, handle: ‘.sort’ }); … Read more
Changes in header.php not reflecting
You will never be able to guarantee this functionality. Filesystem level permissions are ultimately beyond the power of PHP, and thus, WordPress. Though you can try and it may work on some systems/configurations there is no way to guarantee it and nothing you can do if the system will not allow you to change permissions. … Read more
Perfmon performance counters on WAMP