sort by name (slug) custom post type

The “sort” query param is usually “orderby” not “sortby”, to match the SQL ORDER BY clause. Perhaps try: $the_query = ‘posts_per_page=-1&orderby=name&order=ASC&post_type=mycustom&custom_cat=mycat’; It’s also possible that the value you are passing is incorrect, but without knowing the details of your custom post type there’s not much else I can suggest.

Add Custom Values to Permalinks Through Custom Fields and Posts

I fixed this issue by adding a rewrite rule to my functions.php file at the top: function melon_rewrites($rules) { $new_rules = array( ‘parties/([^/]*)/([^/]*)$’ => ‘index.php?melon-parties=$matches[2]’ ); $rules = $new_rules + $rules; return $rules; } add_filter(‘rewrite_rules_array’, ‘melon_rewrites’); I then changed my cpt to allow a query_var: function register_custom_post_types() { $args = array( ‘labels’ => array( ‘name’ … Read more

Loading multiple post content in FancyBox

You are using the selector ‘a[href=”#content”]’ in jQuery but the href attribute of the target links is #content<?php echo $i; ?>. Try removing <?php echo $i; ?> in the href attribute. If you need jQuery code recognise all <a> elements with href starting with the string “content” you can use the ^ modifier: jQuery(‘a[href^=”#content”]’). So … Read more