Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #2096

    I am trying to have a list of all related posts of portfolio categories showing up in the sidebar. Could anyone help me with getting the code?

    I am able to query all posts of the custom post type Portfolio, but how can I distinguish between the different portfolio categories? Best would be to have the titles of all related posts listed, belonging to the same portfolio category – plus another kind of sortable option to get to the archives of all other portfolio categories. So what is the taxonomy of the custom post type portfolio?

    Any ideas? Any other possible solutions for listing related posts? I could also work with tags, couldn’t I?

    Thank you very much.

    #36581
    #36582

    Thanks for your tip, but not quite what we need. The question really is, how can we address portfolio categories instead of post categories? All plugins that we’ve tried only “see” the standard post categories, so we didn’t find a way to do what we planned with plugins. Our goal is to have a kind of sub-navigation in the portfolio post sidebar, enabling users to select all portfolio posts of a given category.

    So, can you tell us how the portfolio categories are handled in Avisio?

    Thanks

    #36583

    They are taxonomies – have a look at this page: http://codex.wordpress.org/Function_Reference/get_taxonomies – there are several code snippets out there how to list them.

    #36584

    I too would really like to see an actual answer to this question (How do I create a sorted ordered list of portfolio post titles with links to posts). I have looked at both links provided – but neither actually helps. These pages help you list the the taxonomy categories – but not the actual posts within that category. I have installed 3 different taxonomy plugins/widgets and they all do the same thing – they list the portfolio category name. Anyone?

    #36585

    I have a solution, but it is not that elegantly coded …

    I added an Executable PHP Widget to the theme. Added that widget to the Sidebar Blog. And then added the following PHP code to the widget …

    Code:
    <?
    //parameters for querying portfolio entries
    global $more;
    $more = 0;
    $overview_post_id = $post->ID;
    $posts_per_page = 9999;
    $query_string = “posts_per_page=”.$posts_per_page;
    $query_string .= “&post_type=portfolio”;
    $query_string .= “&orderby=title&order=ASC”;
    if(isset($useTemplate)) $query_string .= “&portfolio_entries=”.$useTemplate;
    // send query
    $additional_loop = new WP_Query($query_string);
    echo “<div id=”nav_menu-2″ class=”box_small box widget widget_nav_menu”><div class=”menu-main-container”><ul id=”menu-main-1″ class=”menu”>”;
    while ($additional_loop->have_posts()) : $additional_loop->the_post();
    echo “<li class=”menu-item menu-item-type-post_type”>“.get_the_title().”“;
    endwhile;
    wp_reset_query();
    echo “</div></div>”;
    ?>

    #36586

    Glad that you found a solution.

    #36587

    How can i add related portfolio posts with picture and portfolio content?

    Title

    PIC. Content

    #36588

    Hey,

    use the code KingRobb provided above but replace this code line:

    echo "<li class="menu-item menu-item-type-post_type">".get_the_title()."";

    with:

    $prev_image = kriesi_post_thumb($post->ID, array('size'=> array('S','_preview_medium'),
    'wh' => $k_option['custom']['imgSize']['S'],
    'display_link' => array('lightbox'),
    'linkurl' => array ('XL','_preview_big'),
    ));
    echo $prev_image;
    echo '<a href="'.get_permalink().'" rel="bookmark">'.the_title() .'></a>';

    the_content();

    #36589

    Hi Dude

    i use this solution and its working but i have a problem in internet explorer browser problem, picture cant see but i can see content and title.. Chrome and Firefox working..How can i fix it?

    Thanks

    #36590

    My Code:

    global $more;

    $more = 0;

    $overview_post_id = $post->ID;

    $posts_per_page = 10;

    $query_string = “posts_per_page=”.$posts_per_page;

    $query_string .= “&post_type=portfolio”;

    $query_string .= “&orderby=title&order=ASC”;

    if(isset($useTemplate)) $query_string .= “&portfolio_entries=”.$useTemplate;

    $additional_loop = new WP_Query($query_string);

    while ($additional_loop->have_posts()) : $additional_loop->the_post();

    $prev_image = kriesi_post_thumb($post->ID, array(‘size’=> array(‘S’,’_preview_medium’),

    ‘wh’ => $k_option,

    ));

    echo “<table width=’213′ height=’69′>”;

    echo “<tr>”;

    echo “<td rowspan=’2′ align=’left’ valign=’top’>”; echo $prev_image; echo “</td>”;

    echo “<td align=’left’ valign=’top’ class=’baslik’>”;echo ‘‘.get_the_title() .’‘; echo “</td>”;

    echo “</tr>”;

    echo “<tr>”;

    echo “<td height=’21′ align=’left’ class=’aciklama’ valign=’top’>”; the_excerpt(); echo “</td>”;

    echo “</tr>”;

    echo “</table>”;

    endwhile;

    wp_reset_query();

    echo “</div></div>”;

    #36591

    Hey,

    can you post a link to your website please?

    #36592
    #36593

    Hi Dude

    Do you look at the link?

    #36594

    Hey,

    Can you double check the link? It seems to load a default Apache Installed page instead of WordPress: http://www.cl.ly/1M2r123T0j442K3M1A32

    Also, which version(s) of IE are not displaying correctly?

    James

    #36595

    Hey James….

    Sorry…i move it today!..Correct Link : http://bitly.com/iTkbhe

    I tested IE8 and IE9. You can see right section (Egitim Takvimi)…Don’t see İmage in iE..

    Thanks

    #36596

    Hi,

    Do you look at the link?

    #36597

    Hi,

    Really i need fix it.Please help me,

    Thanks

    #36598

    I investigated the site with IE9 developer tools but couldn’t find the cause. Maybe try to deactivate/remove the scrolling effect.

    #36599

    i remove it and tested but the problem continues.

    #36600

    I’m sorry but I don’t know what might cause the problem. It’s not our sidebar widget and it’s hard to say what’s going on. Maybe try to rewrite the structure to a div/paragraph structure or play around with the table styling. Maybe contact the author of the news widget….

    #36601

    Hey,

    Im Changed Html Code ie9 developer Tools,im founded problem this code. when i write width=”70″ height=”50″ i can see post image but how can i fix it i dont know.

    #36602

    This Code ” img width=”1″ height=” ” title=”UYGULAMALI DIŞ TİCARET UZMANLIK PROGRAMI / M.E.B Sertifikalı (30 Temmuz- 21 Ağustos 2011) @Mecidiyeköy” alt=” ” src=”http://localhost/Prokey14temmuzYedek/wp-content/uploads/2011/05/dışT-1-70×50.jpg”

    #36603

    How does the widget code look like? Maybe the width + height values are generated dynamically by using javascript or php. If you can hardcode these values everything should work flawlessly…

    #36604

    i dont use widget and i was test with widget i have a same problem. im using Exec-php plugin.

    ” $prev_image = kriesi_post_thumb($post->ID, array(‘size’=> array(‘S’,’_preview_medium’),

    ‘wh’ => $k_option, “

    This Code my image code calling src=”http://localhost/Prokey14temmuzYedek/wp-content/uploads/2011/05/dışT-1-70×50.jpg” and width=”1″ height=” “

    i need width=”70″ height=”50″.How i can this value Chorome, Mozilla, Safari not problem but its IE9 dont seeing image.

    Thanks.

    #36605

    Try to set the width + height value by using css – first add a class to the table or wrap the image in a div or span with an unique class and use following code in style.css:

    .myclass img{
    width: 70px !important;
    height: 50px !important;
    }

    #36606

    Thanks Dude its working!

    #36607

    Glad that I could help you :)

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

The topic ‘Query Portfolio Related Posts in Sidebar’ is closed to new replies.