Coder Social home page Coder Social logo

Comments (7)

chrisscott avatar chrisscott commented on August 17, 2024

You'll need to get the ID of the page you set as the front page or posts page in the Settings/Reading/Front page displays option. If you are using it on a page set as front page you'll need to pass get_option( 'page_on_front' ) as the third parameter to MultiPostThumbnails::the_post_thumbnail(). If you are using it on a page set as a posts page, you'd need to pass in get_option( 'posts_page' ) instead. If you need to cover both cases, use the is_home() and is_front_page() conditionals.

from multi-post-thumbnails.

guuthemes avatar guuthemes commented on August 17, 2024

is returning no output?

from multi-post-thumbnails.

banderon avatar banderon commented on August 17, 2024

get_option('posts_page') gets the post ID of the posts landing page. You want that as the third parameter in the function call; the first should still be the post type, which in this case would be 'page'.

from multi-post-thumbnails.

guuthemes avatar guuthemes commented on August 17, 2024

Am I missing something here?

from multi-post-thumbnails.

banderon avatar banderon commented on August 17, 2024

First parameter is the post type, third is the post ID (which you get from the option).

from multi-post-thumbnails.

guuthemes avatar guuthemes commented on August 17, 2024

Doh!! Late night. Thanks. I'll try that.

from multi-post-thumbnails.

guuthemes avatar guuthemes commented on August 17, 2024

Works. Only tweak I had to make is, it's page_for_posts, not posts_page.

thanks

from multi-post-thumbnails.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.