mfapsj
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Hueman] How to style custom post typeI added this line to CSS because I had the same (or a similar) problem:
.post-list .post, .post-list .project, .post-list .page { width: 50%; float: left; }PROJECT is the name of my custom post type
Forum: Themes and Templates
In reply to: [Twenty Fourteen] Adding Pages to Featured Posts Areabtw, I tried changing inc/featured-content.php but so far no luck
// Query for featured posts. $featured = get_posts( array( 'post_type' => array( 'post', 'project'), 'numberposts' => $settings['quantity'], 'tax_query' => array( array( 'field' => 'term_id', 'taxonomy' => 'post_tag', 'terms' => $tag, ), ), ) );edit: got it to work by checking in here: http://wordpress.org/support/topic/custom-post-type-tagscategories-archive-page?replies=3
hope you can figure it out for pages 🙂
Forum: Fixing WordPress
In reply to: Getting child categories to sort posts like parent categoryI managed to solve this by adding a function in functions.php which makes having a category template redundant. Not sure if someone is interested, but here it is:
function orderby_additionaldate($query) { if (is_category( array( 2,57 ) ) && $query->is_main_query() || cat_is_ancestor_of(2, get_query_var('cat') ) && $query->is_main_query() || cat_is_ancestor_of(57, get_query_var('cat') ) && $query->is_main_query() ) { if ( $query->query_vars ) { $query->set( 'order', 'DESC' ); $query->set( 'meta_key', 'additional_date' ); $query->set( 'orderby', 'meta_value' ); } } } add_action( 'pre_get_posts', 'orderby_additionaldate' );Forum: Themes and Templates
In reply to: [Twenty Fourteen] Adding Pages to Featured Posts AreaI think my question is very similar. How can I get the query to include custom post type Content tagged ‘featured’?
Thanks though. I wanted it to just display the latest posts and for that it was perfect!
Forum: Installing WordPress
In reply to: Permalink trouble after upgradeJust to let everyone know I turned off the computer – slept over the night and voilà – the problem is resolved
Forum: Installing WordPress
In reply to: Permalink trouble after upgradeI upgraded to 2.3.2 now. Everything of the above is true in my case as well:
*didn’t change permalinks structure
*used to work fine before the upgrade
*the only change i made was upgrading
*.htaccess is existent and gets created and/or updated properly if i delete it or reset the permalinks structure to defaulti have read the using permalinks page – i haven’t found an answer in there.
i have a number of other wp installations under the same hosting account – i haven’t upgraded them yet, most are still running on 2.3.1 or lower – where the custom permalink structure is working perfectly fine. Any help would greatly be appreciated!
Forum: Themes and Templates
In reply to: display custom field only if value present?My original code:
<a href="<?php echo get_post_meta($post->ID, "Photo Gallery", $single = true); ?>">Photo Gallery</a><br />The new one:
<?php $values = get_post_custom_values("Photo Gallery"); if ( is_array($values) ) <a href="<?php echo $values[0]; ?>">Photo Gallery</a> ?> else <?php echo 'Photo Gallery'; ?> ?> <br />The error I get:
Parse error: parse error, unexpected '<' in /home/content/m/a/r/mariaSun/html/marion/wp-content/themes/default/single-cat-14.php on line 31Forum: Fixing WordPress
In reply to: How to list categories and posts on one pageI would love to have that option – but I don’t get how I should include the code provided by slidese (Mike). Can somebody please help?!