Home Forums Theme support Single Portfolio

This topic contains 7 replies, has 2 voices, and was last updated by  7Theme Support 8 years, 1 month ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Hi There,

    On Theme Divengo,
    I have managed to link the text to single portfolio but I couldnt on the images. Still bringing Pretty photo…

    Plase advice.

    Here is the coding I used:

    <?php global $ix, $title, $portfolio2_content, $masonry; ?>
    <!-- portfolio-entry -->
    			<div class='div_portfolio_entry'>
    				<div class="portfolio-img">
    					<div class="portfolio-img-inner">
    						<a href="<?php echo get_permalink(); ?>">
    							<?php if($masonry==true)
    								{
    								?><img src="<?php print  img_masonry_url($post->ID) ?>" alt="" /><?php
    								}
    								else
    									{
    									?><img src="<?php print  img_gallery_url($post->ID) ?>" alt="" /><?php
    									}
    							?>
    						</a>
    						<a href="<?php echo get_permalink(); ?>"></a>
    					</div>
    					<div class='lrs'>
    						<div>
    							<h3><?php echo get_the_title(); ?></h3>
    							<p><?php $terms = get_the_term_list( $post->ID, 'project-type',"",", ","" ); $terms = strip_tags( $terms ); echo $terms; ?></p> 
    						</div>
    					</div>
    				</div>
    			</div>
    					<?php
    					$content=get_the_content();
    					if($portfolio2_content!="")
    						{
    						if(strlen("$content")>$portfolio2_content)
    							{
    							$content=(substr( $content, 0, strpos( $content, " ", $portfolio2_content )+1 ) );
    							}
    						$content=strip_tags($content);
    						echo "<p>$content</p>";
    						}
    					?> 
    				<?php if(load_option("portfolio2_showreadmore")=="on") { ?>
    				<a class="" href="<?php the_permalink(); ?>"> Read more </a>
    				<?php }?>

    Normally with the code above it should work without any problem. Can you send us the link to the page with the modified code, then we can take a look at the source code and help you to solve the problem…

    Hi There,
    I have manage to do so. Sorry for taking your time…

    I have an other issue. I would like to change the name and the link of the taxanomy Portfolio and Project Types to be seen as Tours and Tour Types.

    I tried: ‘rewrite’ => array( ‘slug’ => ‘tours’ ), kind a coding but it didnt work for both…

    Please advice..

    Thank you in advanced..

    The code you used is ok. Do you use a cache plugin? Maybe it’s not working because the cache deliver the old code… Have you tried to delete the browser cache?

    For the project type taxonomy the only thing you can do is to open the file “posttype-portfolio.php” in the folder “7league/”, go to line 22 and change it manually (only “label”, “singular label” and the rewrite code like in your last post).

    Hi There,

    function portfolio_register() 
    	{  
        	$args = array(  
            	'label' => 'Tours',  
            	'singular_label' => 'Tour',  
            	'public' => true,  
            	'show_ui' => true,  
            	'capability_type' => 'post',  
            	'hierarchical' => true,  
            	‘rewrite’ => array( ‘slug’ => ‘tours’ ),  
            	'supports' => array('title', 'editor', 'thumbnail','custom-fields','post-types') ,
    		'show_in_menu' => true  ,
    		 'menu_position' => null,
           	);  
        	register_post_type( 'portfolio' , $args );  
    	}  
    	add_action('init', 'portfolio_register');  
    
    register_taxonomy("project-type", array("portfolio"), array("hierarchical" => true, "label" => "Tour Type", "singular_label" => "Tour Type", "rewrite" => array( "slug" => "tour-type"));
    
    add_action("admin_init", "portfolio_meta_box"); 
    
    

    This is the coding I used but I got an error…

    Parse error: syntax error, unexpected ‘;’ in /home/kusadasitravel/public_html/wp-content/themes/divengo/7league/posttype-portfolio.php on line 22

    Please advice

    Please take a look at this line:

    register_taxonomy("project-type", array("portfolio"), array("hierarchical" => true, "label" => "Tour Type", "singular_label" => "Tour Type", "rewrite" => array( "slug" => "tour-type"));

    There is missing a closing ” ) ” sign, please replace it with this code:

    register_taxonomy("project-type", array("portfolio"), array("hierarchical" => true, "label" => "Tour Type", "singular_label" => "Tour Type", "rewrite" => array( "slug" => "tour-type") ) );

    Thanks a million…It worked…
    Great support…

    You’re welcome!

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.