artlover578
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Getting list of subcategory terms in wordpressI have tried something like so as well:
<?php $terms = get_terms('producttype'); foreach ($terms as $term) { if($term->child == 0 ){ echo '<li>'; echo $term->name; echo '</li>'; } } ?>
This just shows me a few children of the two parents i created I would like to target one parent term labelled “Type” and display all the child terms as links
Forum: Themes and Templates
In reply to: Taxonomies showing up as "invalid" in menuThis was strictly and issue with the ‘slug’ => ”, which must be lower case including the names of the taxonomies
Forum: Themes and Templates
In reply to: Can you have both custom taxonomies and categories?Just change the from
'hierarchical' =>false,
to
'hierarchical' => true,
and then just use the drop down for the parent category
Forum: Themes and Templates
In reply to: Can you have both custom taxonomies and categories?I read that there is such things as hierarchal taxonomies but how would i go about implementing that ?
Forum: Themes and Templates
In reply to: get author email for single post<?php $user_email = get_the_author_meta('user_email'); echo '<a href="mailto:' . $user_email . '">Click here to email author</a>'; ?>
there is the answer if anyone was wondering.
Forum: Themes and Templates
In reply to: BootstrapThanks a million Matthew!!!
Forum: Themes and Templates
In reply to: BootstrapHello Matthew,
Thank you for the response, I have been to the website and read up on it. I just dont understand what it could do that standard HTML5 and CSS3 syntax cannot achieve, when integrated with wordpress.
Forum: Themes and Templates
In reply to: query posts from multiple post typesdont forget to replace post type with your custom post type name
Forum: Themes and Templates
In reply to: query posts from multiple post typesIf anyone was wondering i found the solution in another post on this forum
Here it is :
<?php query_posts( array( 'post_type' => array( 'post-type', 'post-type', 'post-type', 'post-type' ), 'cat' => 3, 'showposts' => 5 ) ); ?> <?php while ( have_posts() ) : the_post(); ?> <div class="post_type"> <?php if ( 'post-type' == get_post_type() ) : ?>FEATURE<?php endif; ?> <?php if ( 'post-type' == get_post_type() ) : ?>REPORT<?php endif; ?> <?php if ( 'post-type' == get_post_type() ) : ?>OPINION<?php endif; ?> <?php if ( 'post-type' == get_post_type() ) : ?>BOOKMARK<?php endif; ?> </div> <a href="<?php the_permalink(); ?> "><?php the_title(); ?></a> <div class="excerpt"> <?php echo get_the_excerpt(); ?> </div> <?php endwhile; ?>
Forum: Themes and Templates
In reply to: @font-face custom fontsThanks Stephencottontail !!!!
Forum: Themes and Templates
In reply to: if user is logged inincredible thank you so much !!
Forum: Themes and Templates
In reply to: if user is logged inthanks, i was just wondering if you help me out with one more thing. how would i go about styling the echo i wrapped the ‘welcome’ in a div
echo '<div class="welcome_user"> Welcome Back </div>' . $current_user->user_login . " " ;
like so, but i cant seem to do that with the .$current_user . as for the variable i would just go about doing something like this?
$logged_in = "<img src="' . get_stylesheet_directory_uri() . '/images/loggedin.svg">"; $not_logged_in="<img src="' . get_stylesheet_directory_uri() '/images/notloggedin.svg">"; if ( is_user_logged_in() ) { echo '$logged_in'; echo '<div class="welcome_user"> Welcome Back </div>' . $current_user->user_login . " " ; } else { echo '$not_logged_in'; wp_login_form(); } ?>
Forum: Themes and Templates
In reply to: if user is logged inThank you very much Timothy, it worked like a charm. highly appreciated!
Forum: Themes and Templates
In reply to: Filter by Taxonomy for custom post typehello,
I found a tutorial here which shows how to complete this task except it is not working for me i do not know why i have followed all the instructions. where it tells me to add the <script> tags i have eliminated that and made a filterable.init.js which contains the code:
jQuery(document).ready(function($) { $("#portfolio-list").filterable(); });
I know that it is bad practice to include a <script> in the page template also, i wp-enque script and i added a dependency to filterable.js but it is still not working. someone please help.
thank you.
[Moderator Note: No bumping, thank you.]
Forum: Themes and Templates
In reply to: Permalinks Not working!!Hello all,
I have created a custom template page(project-page.php which is in my navigation menu. I have used a query to fetch the custom post type “project” using:<div id="container"> <div id="portfolio_posts"> <?php query_posts(array( 'post_type' => 'project', 'showposts' => -1 ) ); ?> <?php while (have_posts()) : the_post(); ?> <h2>"><?php the_title(); ?></h2> <p> Client Name: <span> <?php echo get_custom_field('pf_client_name');?> </span> </p> <p> <?php echo get_custom_field('pf_project_short');?> </p> <div class="custom_post_thumbnail"> <?php the_post_thumbnail( 'thumbnail' ); ?> </div> <?php echo single_term_title('portfolio'); ?> <?php echo get_the_term_list( $post->ID, 'portfolio', '<p>Type: ', ', ', '</p>' );?> <?php endwhile;?> </div><!-- #content --> </div><!-- #container --> <?php get_footer(); ?>
this does display properly but the permalinks do not connect to the single.php does any one know why?