Forum Replies Created

Viewing 11 replies - 16 through 26 (of 26 total)
  • Forum: Fixing WordPress
    In reply to: DNS
    Thread Starter Tokant

    (@tokant)

    Thanks for the answer. I wasn’t fully aware of the SEO issue. Thanks for clearing that up.
    There’s printed material (posters, postcards, etc.) showing the .net address, so that’s why i’d like to avoid using a webforward.

    It appears the small 150x150px-image is the Featured Image (thumbnail) and the other the attachment image.

    The first or second image should be removed from the code that generates this html:

    <div class="post-comment">
    <img class="alignleft wp-post-image" width="150" height="150" alt="rim" src="https://citationneeded.biz/wp/wp-content/uploads/2013/07/rim-150x150.jpg">
    <img class="attachment-index-categories wp-post-image" width="868" height="318" alt="rim" src="https://citationneeded.biz/wp/wp-content/uploads/2013/07/rim.jpg">
    <p>        WTF: Pacific Rim</p>
    </div>

    It is difficult for me to know what has been the cause but nice that your issue has been resolved. (Please mark this topic as resolved)

    Is your WordPress installed in the subdirectory /blog/ or do you have a page called Blog?

    If you have a page called Blog and want that page to show your posts, go to Settings and Reading. Select “A static page” and select you frontpage and posts page.

    Forum: Fixing WordPress
    In reply to: Responsive Images

    In your CSS-file you need something like:

    background-size: contain;
    background-size: cover;
    Thread Starter Tokant

    (@tokant)

    Problem solved. For others who need to display related posts, use this:

    <?php
    // Find connected posts
    $related = p2p_type( 'galleries_to_exhibitions' )->get_related( get_queried_object() );
    // Display related posts
    if ( $related->have_posts() ) :
    while ( $related->have_posts() ) : $related->the_post(); ?>
    code for each exhibition ...
    <?php
    endwhile;
    // Prevent weirdness
    wp_reset_postdata();
    endif;
    ?>
    Thread Starter Tokant

    (@tokant)

    Okay, i found out exactly what to implement, as described here:
    https://github.com/scribu/wp-posts-to-posts/wiki/Related-posts

    $related = p2p_type( ‘posts_to_pages’ )->get_related( get_queried_object() );

    But how do i use this in the following WP_Query?

    <?php
    // Find connected pages
    $connected = new WP_Query( array(
    'connected_type' => 'galleries_to_exhibitions',
    'connected_items' => 'any',
    'connected_direction' => 'from',
    'nopaging' => true
    ) );
    // Display connected pages
    if ( $connected->have_posts() ) :
    ?>
    code for each exhibition ...
    <?php
    // Prevent weirdness
    wp_reset_postdata();
    endif;
    ?>

    Thanks!

    Forum: Fixing WordPress
    In reply to: Page and CPT slugs
    Thread Starter Tokant

    (@tokant)

    Thanks alot!

    I will try your recommendations.

    Forum: Fixing WordPress
    In reply to: Page and CPT slugs
    Thread Starter Tokant

    (@tokant)

    No, pages are not added automatically.

    When you set up a custom menu you have different options. Among others; adding pages and userdefined links.

    If one uses Custom Post Type archives, these are added to the menu through userdefined links as they are not set up as a page under Pages.
    So yes, right now by using your method i am adding the Custom Post Type archive page to the menu.

    This method is not as straightforward compared to simply using pages.

    I could of course add a page which uses a page template called page-places.php which loops through the custom post type that has the slug /caw-places/.
    But the permalinks for each post on the template page will not have the slug /places/ but /caw-places/.

    That is why i need a workaround. Do you have any tips for this second method?

    Forum: Fixing WordPress
    In reply to: Page and CPT slugs
    Thread Starter Tokant

    (@tokant)

    Hi,

    Thank You very much for taking your time to answer.

    I am very well aware of the archives-solution. However, it is a more complex to set up pages this way in the menu – through userdefined links – because the menu will then consist of both pages and userdefined links. In addition, i use the WPML translation plugin and this makes it a bit more complex since i need to add userdefined links to each language-menu. Using only pages makes the translated menus more automated.

    That is why i am still interested in knowing if there is a way to only use pages.

    Thanks again!

    Thread Starter Tokant

    (@tokant)

    Thank you for your answer ??

Viewing 11 replies - 16 through 26 (of 26 total)