Theme And Simple
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: get_posts with Taxonomies and custom fieldsIs this (roughly) how you register post type and taxonomy?
/** * Post type * */ function my_custom_post_type_voiture() { $labels = array( 'name' => _x( 'Voitures', 'post type general name' ), 'singular_name' => _x( 'Voiture', 'post type singular name' ), 'add_new' => _x( 'Add New', 'Voiture' ), 'add_new_item' => __( 'Add New Voiture' ), 'edit_item' => __( 'Edit Voiture' ), 'new_item' => __( 'New Voiture' ), 'all_items' => __( 'All Voitures' ), 'view_item' => __( 'View Voiture' ), 'search_items' => __( 'Search Voitures' ), 'not_found' => __( 'No Voitures found' ), 'not_found_in_trash' => __( 'No Voitures found in the Trash' ), 'parent_item_colon' => '', 'menu_name' => 'Voitures' ); $args = array( 'labels' => $labels, 'description' => 'Holds our voitures specific data', 'public' => true, 'menu_position' => 105, 'menu_icon' => get_template_directory_uri(). '/images/voitures.png', 'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt' ), 'has_archive' => true, ); register_post_type( 'voiture', $args ); } add_action( 'init', 'my_custom_post_type_voiture' ); /** * Taxonomies * */ function my_taxonomies_voiture() { $labels = array( 'name' => _x( 'Marques', 'taxonomy general name' ), 'singular_name' => _x( 'Marque', 'taxonomy singular name' ), 'search_items' => __( 'Search Marques' ), 'all_items' => __( 'All Marques' ), 'parent_item' => __( 'Parent Marque' ), 'parent_item_colon' => __( 'Parent Marque:' ), 'edit_item' => __( 'Edit Marque' ), 'update_item' => __( 'Update Marque' ), 'add_new_item' => __( 'Add New Marque' ), 'new_item_name' => __( 'New Marque' ), 'menu_name' => __( 'Marques' ), ); $args = array( 'labels' => $labels, 'hierarchical' => true, ); register_taxonomy( 'Marque', 'voiture', $args ); } add_action( 'init', 'my_taxonomies_voiture', 0 );
Forum: Fixing WordPress
In reply to: Fatal Error with NMI interfaceI think the best you can do is to contact the plugin developer here.
Forum: Fixing WordPress
In reply to: get_posts with Taxonomies and custom fields$args = array( 'post_type' => 'voiture', 'tax_query' => array( array( 'taxonomy' => 'brand', 'field' => 'slug', 'terms' => 'BMW' ) ), 'meta_query' => array( array( 'key' => 'prix', 'value' => ($_REQUEST['prix_min']), 'type' => 'NUMERIC', 'compare' => '>=' ), array( 'key' => 'prix', 'value' => ($_REQUEST['prix_max']), 'type' => 'NUMERIC', 'compare' => '<=' ) ) ); $postslist = get_posts( $args );
Forum: Fixing WordPress
In reply to: Linking WooCommerce to Sage 50 for stock takingYes, it is possible to integrate Sage 50 data into other systems.
See this topic for more information.Forum: Fixing WordPress
In reply to: Repeating page titles on menuHave you tried removing a single item from the menu to see whether the item disappears from both menus?
Forum: Fixing WordPress
In reply to: Repeating page titles on menuLog in to the dashboard
Go to Appearance -> menusCheck if you have the same menu assigned to both pages and category menu (there will be a dropdown where you’ll be able to select which menu to display for each pages and category menu. Make sure there is only one menu assigned as it looks like there are two available menu spaces and both contain the same menu.
Save, check the page again.
Forum: Fixing WordPress
In reply to: Please help with widget.phpCould you paste the first line of the /home/centenia/public_html/wp-content/themes/ArtSee/includes/widgets.php file?
Forum: Fixing WordPress
In reply to: Repeating page titles on menuI believe there is the same menu displayed in both pages_menu and cat_menu (judging from html output).
Can you try and remove menu assignment from the cat_menu to see if it solves the issue?Forum: Fixing WordPress
In reply to: action when in time rangeif you’re talking about today, maybe you should change the year to 2013 ??
Forum: Fixing WordPress
In reply to: 404 Error File Not FoundCheck settings -> permalinks. You should be using non default settings.
Click “save changes” button even if everything seems fine.
Check the .htaccess file in the home directory. If missing – upload it.Forum: Fixing WordPress
In reply to: action when in time rangeI believe that you’ve changed the date string to your desired date. What date exactly do you want the text to stop showing?
Forum: Fixing WordPress
In reply to: action when in time rangeMake sure that timezone is set correctly in your php.ini file, or use the date_default_timezone_set() function. Here you can find list of valid timezones.
Example code:
<?php date_default_timezone_set('America/Los_Angeles'); if (time() < strtotime("11/25/2014 11:20PM")): ?> <p>Show me!!!</p> <?php endif; ?>
Forum: Fixing WordPress
In reply to: Internal Server Error 500Is the .htaccess file correct?
Forum: Fixing WordPress
In reply to: number of posts on front pageI think that pre_get_posts filter may work for you.
Try adding this code at the end of the theme functions.php filefunction tas_limit_posts_homepage( $query ) { if ( $query->is_home() && $query->is_main_query()) { $query->set( 'posts_per_page', 10 ); return; } } add_action( 'pre_get_posts', 'tas_limit_posts_homepage', 1 );