Forum Replies Created

Viewing 15 replies - 1 through 15 (of 23 total)
  • Thread Starter artlover578

    (@artlover578)

    I 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

    Thread Starter artlover578

    (@artlover578)

    This was strictly and issue with the ‘slug’ => ”, which must be lower case including the names of the taxonomies

    Thread Starter artlover578

    (@artlover578)

    Just change the from

    'hierarchical' =>false,
    to
    'hierarchical' => true,

    and then just use the drop down for the parent category

    Thread Starter artlover578

    (@artlover578)

    I read that there is such things as hierarchal taxonomies but how would i go about implementing that ?

    Thread Starter artlover578

    (@artlover578)

    <?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: Bootstrap
    Thread Starter artlover578

    (@artlover578)

    Thanks a million Matthew!!!

    Forum: Themes and Templates
    In reply to: Bootstrap
    Thread Starter artlover578

    (@artlover578)

    Hello 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.

    Thread Starter artlover578

    (@artlover578)

    dont forget to replace post type with your custom post type name

    Thread Starter artlover578

    (@artlover578)

    If 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; ?>
    Thread Starter artlover578

    (@artlover578)

    Thanks Stephencottontail !!!!

    Thread Starter artlover578

    (@artlover578)

    incredible thank you so much !!

    Thread Starter artlover578

    (@artlover578)

    thanks, 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();
    
    }
    ?>
    Thread Starter artlover578

    (@artlover578)

    Thank you very much Timothy, it worked like a charm. highly appreciated!

    Thread Starter artlover578

    (@artlover578)

    hello,

    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.]

    Thread Starter artlover578

    (@artlover578)

    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?

Viewing 15 replies - 1 through 15 (of 23 total)