Tag Info

Hot answers tagged

2

What about something like that? function wpse139657_orderby(){ if( isset($_GET['orderby']) ){ $order = $_GET['order'] or 'DESC'; set_query_var('orderby', 'meta_value_num'); set_query_var('meta_key', $_GET['orderby']); set_query_var('order', $order); } } add_filter('pre_get_posts','wpse139657_orderby'); In this way ...


2

By far the easiest fix is to edit wp-config.php to define two constants. (s)FTP into your site, or use a host supplied file manager, and add: define( 'WP_SITEURL', 'http://www.abc.com/folder' ); define( 'WP_HOME', 'http://www.abc.com/folder' ); Those will be used instead of the information in the database. That will get your site up and running again. ...


1

In WordPress, URLs don't map to routes. They map to database queries. When using WordPress in the "default" permalinks mode, you have a set of variables in the main URL query, like ?p=1 or ?page=234 and so forth. There's also ?s=search and many others. If you use the "pretty" permalinks, then a big set of rules called the "rewrite rules" is created which ...


1

This ended up doing the trick. function auto_hashtag( $menu_item ) { if ( ! is_admin() && $menu_item->post_parent > 0) { // url $url = $menu_item->url; $menu_item->url = preg_replace('!/([^/]+)/$!', "/#\\1", $url); } return $menu_item; } add_filter( 'wp_setup_nav_menu_item', 'auto_hashtag' );



Only top voted, non community-wiki answers of a minimum length are eligible