Forum Replies Created

Viewing 10 replies - 46 through 55 (of 55 total)
  • jessy

    (@jessy-marco)

    If you want to learn someting about facebook meta and how to add it correctly Facebook Integration

    jessy

    (@jessy-marco)

    1, Could you send me a link and if possible login details, I will figure out for you.
    2, Send a host link.
    3, Try remove completely wordpress with database and try from cPanel SimpleScript

    jessy

    (@jessy-marco)

    Turn them off all and test it. Then turn on one by one.

    Forum: Fixing WordPress
    In reply to: Zemanta
    jessy

    (@jessy-marco)

    1, This snippets works fine for non-logged users too.
    2, I do not use any plugin for this simple feature, because it slow down the website. Snippets are great.
    3, Example of the code Beers Pubs
    4, Related posts are the best to create from tags of the post or categories, that is php logic of the function.
    5, Markup based on Bootstrap 2.3.2

    Related posts by tags:

    <?php
    // $current_post = $post;
    
    //Call global variable posts
    global $post;
    
    //Save to variable all tags from the post ID
    $posttags = wp_get_post_tags($post->ID);
    
    //If the post has a tags
    if ($posttags) {
    
    //set up tags_ids as arrays
    $tags_ids = array();
    
    //loop through post tags from the current post and set array tags_ids save it from object posttags
    foreach($posttags as $posttag) $tags_ids[] = $posttag->term_id;
    
    //set arguments as array for the object wp_query
    $args = array(
        'tag__in' => $tags_ids,
        'post__not_in' => array($post->ID),
        'posts_per_page'=> 4, // Number of related posts that will be shown.
        'ignore_sticky_posts'=>1
    );
    
    //Set the new object and asign there an array of the arguments
    $relatedposts = new wp_query( $args );
    
    //loop
    if( $relatedposts->have_posts() ) {
        echo '<div class="related-posts clearfix"><h4>Related Posts</h4><div class="row-fluid">';
    
    while( $relatedposts->have_posts() ) { $relatedposts->the_post(); ?>
    
    <div class="span3">
    <a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_post_thumbnail('relatedpost-image'); ?></a>
    <span><a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
    </div>
    
    <? }
    
    echo '</div></div>';
    
    } //end of the post
    } //end of if the post has tags
    // $post = $current_post;
    wp_reset_query();
    ?>
    jessy

    (@jessy-marco)

    So, I see that they are linked to portfolio single page, right?

    Example: https://udirtyslut.com/portfolio/brittany/

    And you want to go to affiliate link: like: https://www.yourdatingsite.com/affiliatecode

    You can quickly define custom field affiliate link and than call out with loop.

    The best way is to give me access to your site and I will do it for you for free.

    Forum: Fixing WordPress
    In reply to: Zemanta
    jessy

    (@jessy-marco)

    II options:

    1, Contact https://www.zemanta.com
    2, Into functions.php write this snippets from https://wpsnipp.com

    Into the function.php:

    function get_related_author_posts() {
        global $authordata, $post;
        $authors_posts = get_posts( array( 'author' => $authordata->ID, 'post__not_in' => array( $post->ID ), 'posts_per_page' => 5 ) );
        $output = '<ul>';
        foreach ( $authors_posts as $authors_post ) {
            $output .= '<li><a href="' . get_permalink( $authors_post->ID ) . '">' . apply_filters( 'the_title', $authors_post->post_title, $authors_post->ID ) . '</a></li>';
        }
        $output .= '</ul>';
        return $output;
    }

    Into the single.php (single page) this tag:

    <?php echo get_related_author_posts(); ?>

    jessy

    (@jessy-marco)

    Send me link to website (homepage) I will send you more details.

    It seems to be problem in WP LOOP or WP QUERY LOOP.

    <a href="youraddress.com"><img src="yourimage.jpg"></a>

    jessy

    (@jessy-marco)

    It seems to work fine. Let me know if you have any further problems.

    jessy

    (@jessy-marco)

    1, Is it local instalation?
    2, Is it linux distribution?
    3, What is old version of the wordpress?

    jessy

    (@jessy-marco)

    Could you list your plugins?

Viewing 10 replies - 46 through 55 (of 55 total)