Custom menu linking to page not found
I figured it out. The menu name was “Search” so wordpress redirected the subpages to the wordpress search results page and was assuming the search functionality.
I figured it out. The menu name was “Search” so wordpress redirected the subpages to the wordpress search results page and was assuming the search functionality.
Get all children categories using get_terms(). Loop through each term and run a new query using tax_query. Example: <?php if ( get_queried_object()->parent == 0 ) : // parent cat ?> <h2>Showing all children</h2> <?php $args = array( ‘hide_empty’ => false, ‘parent’ => get_queried_object()->term_id ); $terms = get_terms( ‘category’, $args ); if ( $terms ) echo … Read more
Your best bet to do this would be to add a filter/hook on the specific tag. See this snippet at the WooCommerce API docs site on excluding a category for the proper format and to get going in the right direction. http://wcdocs.woothemes.com/snippets/exclude-a-category-from-the-shop-page/ But if you want a down and dirty way to filter for a … Read more
In your theme’s functions.php, write the following code: <?php /* ENABLING CUSTOM MENUS ————————————————– */ //add_theme_support( ‘menus’ ); register_nav_menus( array( ‘primary’=>__(‘Primary Menu’), ‘secondary’=>__(‘Secondary Menu’), ) ); ?> It’ll register two custom menu area for your theme. Then you need to achieve it with in header.php: <?php wp_nav_menu ( array ( ‘theme_location’=>’primary’, ‘fallback_cb’=>”) ); ?> This … Read more
Pages work this way, so you could either use pages or create a new post type (you’d need the hierarchical => true: function codex_custom_init() { $labels = array( ‘name’ => _x(‘Books’, ‘post type general name’, ‘your_text_domain’), ‘singular_name’ => _x(‘Book’, ‘post type singular name’, ‘your_text_domain’), ‘add_new’ => _x(‘Add New’, ‘book’, ‘your_text_domain’), ‘add_new_item’ => __(‘Add New Book’, … Read more
I added remove_action( ‘wp_head’, ‘feed_links’, 2 ); in functions.php file. and added in the header.php. This fulfilled my purpose.
Don’t replace old url to new url in database file. wp-login.php can be used to (re-)set the URIs. Find this line: require( dirname(__FILE__) . ‘/wp-load.php’ ); and insert the following lines below: Do comment/remove these lines. (once the database is updated) update_option(‘siteurl’, ‘http://your.domain.name/’ ); update_option(‘home’, ‘http://your.domain.name/’ ); for more information http://codex.wordpress.org/Moving_WordPress
The first problem can be solved by changing the query_posts in your work section. Replace ‘&category_name=work’ with ‘&category_name=work&paged=1&posts_per_page=-1’ For the second problem, why not use the category template itself in place of index.php? As a side note, you should not use query_posts for this use case. In place of that you should use a new … Read more
For what I understand you want to implement a custom menu in your wordpress theme. First of all you have to understand the template structure of the theme you’re using. Most themes have the navigation menu in the header.php or templates/head.php, it depends. Additionally, will you use a static menu or dynamic? Dynamic meaning you’re … Read more
You can list all the attributes of a product by putting the following code in a template file: global $product; $product->list_attributes();