Forum Replies Created

Viewing 15 replies - 1 through 15 (of 31 total)
  • Thread Starter WPnerdzz

    (@wpnerdzz)

    Hi, you are right, I checked response header and it was
    X-LiteSpeed-Cache miss
    I removed PHPSESSID to check it and it is showing
    X-LiteSpeed-Cache hit,private
    I logged out and logged in again and it seems to be working. Also tried user with subscriber role and that is working as well. looks like my problem is fixed. And it is probably not a good idea to hardcode Litespeed API on theme for flexibility.

    • This reply was modified 4 years, 5 months ago by WPnerdzz.
    • This reply was modified 4 years, 5 months ago by WPnerdzz.
    Thread Starter WPnerdzz

    (@wpnerdzz)

    I needed a “Specification” tab where I could post an HTML table. I have done it using a plugin called Custom Product Tabs for WooCommerce

    Thread Starter WPnerdzz

    (@wpnerdzz)

    I have the plugin but I would rather not use it for security concern. And I should not be the only one who would need to sort posts by monthly or weekly views.

    Thread Starter WPnerdzz

    (@wpnerdzz)

    The post title where I am adding this code is “Alex’s book collection”.
    The other post I am trying to get info from is “Alex’s book collection – 1.9”

    Thread Starter WPnerdzz

    (@wpnerdzz)

    No no no…

    The title in Post type: book is “Alex’s book collection”
    In single book page, I am trying to post info from another post from different post type: release_link named “Alex’s book collection – 1.9”.
    The title of this post type has a format like <book name> – <version>. I added a meta box in post type: book where I can enter book version (1.9 in this case).

    $lz_name = get_the_title().' - '.$lz_version;
    $lz_links = get_page_by_title($lz_name, OBJECT, 'release_link');

    This works only if there is no inverted commas in book title.

    You can download xampp portable and extract it in a pen drive. then you can carry it to wherever you want and work on any computer. or you can buy a hosting and make your project live and work via internet.

    Thread Starter WPnerdzz

    (@wpnerdzz)

    bump

    All of your texts and stuffs are messed up. Have you noticed a “\” before inverted commas?
    I had a look at /?p=5299 and this is the state of texts.

    \”\”

    Christopher Nolan has been often named as the new Generation\’s Stanley Kubrick which was cemented when he directed Interstellar- which was more of an ode to Kubrick\’s groundbreaking 2001: A Space Odyssey- Dunkirk seals it in as Nolan\’s version of \’Paths of Glory\’ and \’Full Metal Jacket\’.

    I have no idea what happened to your site but some plugin screwed you up big time I assume.
    You can search and replace using phpmyadmin. For example,
    \’ => '
    \" => "
    CAUTION: BACKUP YOUR FULL DATABASE. I AM NOT RESPONSIBLE IF YOU LOSS YOUR DATABASE.
    Login to phpmyadmin.
    Navigate to your-database-name>wp_post table.
    Click search tab>find and replace.
    search for \’ and replace it with '. Do in both post_content and post_title.
    search for \" and replace it with ". Do in both post_content and post_title.
    This should remove those unnesessery \s and you should be able to see images.
    CAUTION: BACKUP YOUR FULL DATABASE. I AM NOT RESPONSIBLE IF YOU LOSS YOUR DATABASE.

    • This reply was modified 5 years, 9 months ago by WPnerdzz.
    • This reply was modified 5 years, 9 months ago by WPnerdzz.
    • This reply was modified 5 years, 9 months ago by WPnerdzz.
    Thread Starter WPnerdzz

    (@wpnerdzz)

    Thanks for the reply. My wordpress version was 5. Updated to 5.1 just now. It still doesnt work.
    Here is the code in my theme.
    $lz_version= get_post_meta( $post->ID, 'option_current-release', true );
    a metabox with a number like 1.9.
    $lz_name = get_the_title().' - '.$lz_version;
    it echos something like “Alex’s book collection – 1.9
    $lz_links = get_page_by_title($lz_name, OBJECT, 'release_link');
    release_link is a custom post type. The titles of that CPT are like “Alex’s book collection – 1.9”
    echo get_the_title($lz_links>ID);
    it echos the title of current page “Alex’s book collection”, not desired “Alex’s book collection – 1.9”
    But if I dont add any apostrophe, the code works fine.

    • This reply was modified 5 years, 9 months ago by WPnerdzz.
    • This reply was modified 5 years, 9 months ago by WPnerdzz. Reason: typo
    • This reply was modified 5 years, 9 months ago by WPnerdzz. Reason: additional info

    Go to settings>permalink and just press save button and see if it works.

    if(get_post_meta($post->ID, 'meta-key', true))
        echo '<div class="whatever html u want">'. get_post_meta($post->ID, 'meta-key', true) .'</div>';
    }

    u can find meta key by inspecting the field in post editor. meta key usually be there as a class/id.

    Forum: Fixing WordPress
    In reply to: Update not working

    Which type of server are you using? set the permission of update-core.php to 777, do the update and then change it back to 755.

    I am posting an working random-posts-from-from-custom-taxonomy here.. I used it in my old theme and it is 100% functional. just clear the mess… sorry for messy snippet.

    <?php
    
    // get the custom post type's taxonomy terms
    
    $custom_taxterms = wp_get_object_terms( $post->ID, 'genre', array('fields' => 'ids') );
    // arguments
    $args = array(
    'post_type' => 'albums',
    'post_status' => 'publish',
    'posts_per_page' => 13, // you may edit this number
    'orderby' => 'rand',
    'tax_query' => array(
        array(
            'taxonomy' => 'genre',
            'field' => 'id',
            'terms' => $custom_taxterms
        )
    ),
    'post__not_in' => array ($post->ID),
    );
    $related_items = new WP_Query( $args );
    // loop over query
    if ($related_items->have_posts()) :
    echo '<div class="widget"><h4 class="related_head">Also Check Out</h4><ul class="related section group">';
    while ( $related_items->have_posts() ) : $related_items->the_post();
    ?>
        <li class="col2 x12"><div class="img"><a href="<?php the_permalink(); ?>"><?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    	the_post_thumbnail( 'small_thumb' );
    }
    else { ?> <img width="60" src="/mp3/albumcover_min.jpg" alt="<?php the_title(); ?> Album thumb image" />
    <?php }
    ?></a></div><div class="related_content"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a><br/>
    <?php echo get_post_meta($post->ID, 'wpcf-total-songs', true); ?> Songs</div></li>
    <?php
    endwhile;
    echo '</ul></div>';
    endif;
    // Reset Post Data
    wp_reset_postdata();
    ?>

    bbpress can prettymuch do everything.. BBpress is a part of wordpress made by same developers that does not include in main package because not every blog needs a forum. it is easy to install and have it’s own forum identical to wordpress forum.

    Offset: offset (int) – number of post to displace or pass over. Warning: Setting the offset parameter overrides/ignores the paged parameter and breaks pagination. The ‘offset’ parameter is ignored when ‘posts_per_page’=>-1 (show all posts) is used.
    source: codex

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