Is it possible to add an admin page using add_submenu_page() and pass a var in the query string?

Your menu slug (5th parameter) can’t be the same across multiple pages, and it obviously can’t have an & in it, but you can have all the pages you want call the same callback function (the last param). add_submenu_page(‘upload_manage’, “Programs”, “Programs”, ‘manage_options’, ‘manage-programs’, “manage_data”); add_submenu_page(‘upload_manage’, “Schedule”, “Schedule”, ‘manage_options’, ‘manage-schedule’, “manage_data”); Then in the manage_data function, … Read more

order by second word in title?

There is a filter, ‘posts_orderby’, which allows you to specify your own ORDER BY clauses. In your case, the code would look something like this: add_filter( ‘posts_orderby’, ‘order_by_surname’ ); function order_by_surname( $orderby, $query ) { // first you should check to make sure sure you’re only filtering the particular query // you want to hack. … Read more

Paginate Link generate additional #038; whenever my Url have multiple Query String

There’s no need to escape the URL twice – get_pagenum_link() by default returns an escaped URL — when the second parameter is true, esc_url() is used; else, esc_url_raw() is used: With esc_url(): http://localhost/wordpress/blog/?filter=23&orderby=oldest With esc_url_raw(): http://localhost/wordpress/blog/?filter=23&orderby=oldest And the problem occurs when the base contains ?, or a query string, and that the URL is escaped … Read more

rewrite rules and querystring

You can add your own rewrite rule which will let you tweak the query via URL parameters: add_action( ‘init’, ‘rewrite_photo_url’ ); function rewrite_photo_url() { add_rewrite_rule( ‘photos/([^/]+)/?$’,’index.php?page=photos&photo_id=$matches[1]’, ‘top’ ); } If you need to use a custom variable, i.e. ‘photo_id’, you have to register the variable so it will be recognized by the query: add_filter( ‘query_vars’, … Read more

Get query string parameters url values with jQuery / Javascript (querystring)

Anyone know of a good way to write a jQuery extension to handle query string parameters? I basically want to extend the jQuery magic ($) function so I can do something like this: Which would give me the value “test” in the following URL: http://www.example.com/index.php?search=test. I’ve seen a lot of functions that can do this … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)