Forum Replies Created

Viewing 10 replies - 31 through 40 (of 40 total)
  • Acts7

    (@acts7)

    By the way alchymyth THANK YOU!!!!! For the speedy response and for helping me figure that one out. I was surprised that wordpress codex didn’t have an obvious answer to that one.
    Now there is an answer!
    THANK YOU!

    Acts7

    (@acts7)

    https://phpxref.ftwr.co.uk/wordpress/wp-includes/post-thumbnail-template.php.source.html#l25
    AWESOME! Thank you for that link, I didn’t know it existed!

    Could I ask, how did you know to look for the meta_key?
    I’m trying to teach myself better standards of coding and research.

    Was it because of the following:
    You knew I was attempting to retrieve the thumbnail, so you look up the method of retrieving the thumbnail?
    But then how did you know that you could retrieve it as a meta_id in a “query_posts”.

    I guess what I’m asking is could you let me in on how you found a method to this madness?

    Anyone else find a solution.
    I think you’re having the same issue as me.
    I was the 5 most recent ONLY that have thumbnails.

    The issue with the above code is, if you query 12 posts, maybe only 6 have thumbnails/featured images.
    Then you only display 6.

    What I want and I believe the original poster is asking is:
    How can you ensure that you are delivering 12 posts that definately have thumbnail?
    ie
    post 1 (no thumb – so start showposts count over)
    post 2 (has thumb – now only need 11 more posts WITH thumbnail)
    post 3 (yes thumb – count is now 2 posts)
    post 4 (no thumb – count remains at 2 posts)

    etc.

    important note.
    In the options for Avatar Plugin

    Make sure you check both boxes
    “User Uploads” (this is on the left column of the options)
    “Use Legacy” (this is in the description on the right)

    Above that is a text field.
    Make sure you use a “/” at the beginning of the path.

    LOCAL HOST EXAMPLE:
    Where Viewing path is:
    https://localhost/nameOfBlog/

    Place this in the text box under Avatar Options (without the quote marks)
    "/nameOfBlog/uploads/avatars"

    Make sure you have created a folder in the blog folder’s root called “uploads” and inside of that folder a folder called “avatars”

    LIVE SITE EXAMPLE:
    Where Viewing path is:
    https://www.nameOfBlog.com

    Place this in the text box under Avatar Options (without the quote marks)
    "/uploads/avatars"

    Make sure you have created a folder in the root called “uploads” and inside of that folder a folder called “avatars”

    UGG Couldn’t get it to post the code here properly.
    I posted the code on my blog:
    https://www.myvideosnapshots.com/wordpress-get-posts-with-custom-taxonomies-resolved.html
    This should give you a very very sweet and slick little loop pull posts by custom taxonomy.
    Use as many loops as you want.
    I also gave you some bonus code to prevent posts from duplicating.

    //First you need to enable featured images:
    add_theme_support( 'post-thumbnails' );
    
    // Then define featured image size.
    //By the way you can have multiple sizes.
    //Just name them differently
    // and call them by name to display
    add_image_size('testimonails-photo', 240, 160, true);
    // Testimonial Image size

    //BELOW WOULD NEED TO GO INSIDE YOUR LOOP / QUERY

    // Grab the featured images and strip out the title
    $testimonails_image = get_the_post_thumbnail($post->ID, 'testimonails-photo');
    $testimonails_image_format = preg_replace('/title=\"(.*?)\"/','',$testimonails_image);
    
    { ?>
    <div id="testimonialContainer">
    <?php
    if (!(empty($testimonails_image))) { ?>
    <div id="testimonialImage">
    <?php echo $portfolio_image_format; ?>
    </div><!-- //testimonialImage -->
    <?php }
    ?>
    <div id="testimonialText">
    <?php
    // your content to display text here.
    ?>
    </div><!-- //testimonialText -->
    </div><!-- //testimonialContainer -->
    
    //FINALLY Always include a reset at the end of a loop
    //This prevents conflict with other loops
    wp_reset_query(); ?>

    //don’t forget to actually click the “featured image” and add an image or it won’t display.

    Right now I do not believe its possible to have one custom post be a child of another custom post.
    You could include the content of a custom post inside a regular post.

    Could you describe what you’re attempting to achieve?

    source

    Don’t know if you still need this but:

    function new_excerpt_length($length) {
    if(in_category(14)) {
    return 13;
    } else {
    return 60;
    }
    }
    add_filter(‘excerpt_length’, ‘new_excerpt_length’);

    UGG I GOT THAT BACKWARDS:

    IF YOU CHECK TO DISABLE – then you have all functionality.
    INCLUDING THE SLIDE FUNCTION WORK.

    IF ITS UNCHECKED YOU LOSE ALL FUNCTIONALITY/.

    The fix may be simpler than we think.
    IF someone could figure out the correct toggle.
    I could not get the save button to work.
    I couldnt move any items around.
    Then I UNCHECKED the box (under user profile) for do not use visual editor.
    The TinyMCE Adv plugin says make sure its checked.
    But here’s what weird.
    WITH IT CHECKED, I CANNOT:
    Move items on the tool bar
    I cannot save changes
    I Cannot uncheck any checkboxes for the plugin’s setting.
    I CANNOT insert an image from that grey icon above the tool bar (you know {insert image] [insert media] …. (those 4 buttons).

    So does anyone have a guess as to how to fix the toggle???

Viewing 10 replies - 31 through 40 (of 40 total)