Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • This may prove useful to others, which is what I did for a client’s website. The coding that controls the slider is located in wp-content\themes\advantage\pages\featured.php. It creates a typical WP_Query object for retrieving the content needed for the slider – which we can edit in many ways as needed.

    I created a meta-box for my pages, which involve two pieces of metadata:
    – Tickbox for if the page is to go in the slider
    – Weburl for if the link is to go somewhere other than the page
    – ‘homepageordernumber’, which is used to do the order the page will appear in the slider

    I tweaked the WP_Query object in featured.php to call pages (rather than posts), to order by my homepageordernumber metadata field and to check if the tickbox metadata was ‘true’. Then I replaced the permalink command with a variable that called my Weburl metadata.

    Finally, I created an admin page which called the homepage slides and allowed for easy re-ordering.

    The coding I added to the the functions.php to achieve this is here:
    https://pastebin.com/fj0QU75C

    Note that this coding places the option to edit the homepage slider under settings in the admin window.

    The WP_Query I use in featured.php is this:
    $featured_args = array(
    ‘post_type’ => ‘page’,
    ‘post_status’ => ‘publish’,
    ‘posts_per_page’ => $post_pp,
    ‘ignore_sticky_posts’ => 1,
    ‘no_found_rows’ => 1,
    ‘orderby’ => ‘meta_value_num’,
    ‘meta_key’ => ‘homepageordernumber’,
    ‘order’ => ‘ASC’,
    ‘meta_query’ => array ( array(
    ‘key’ => ‘homepagecheckbox’,
    ‘value’ => ‘Yes’ ))
    );

    The slider is included, but it isn’t a slider in the sense you seem to think. What it does is take recent posts and, using the featured images of those posts, generates the slider.

    If you are looking for customisable slider in the traditional sense where you build each slide individually then the Advantage slide won’t do what you are looking for – and I’d have to recommend you seek out a plugin for the purpose.

    Fresh WP install and only the Advantage theme installed. Refuses to make thumbnails. Had to downgrade from 2.0 for a customer’s website I was preparing to build, and I just verified that the same issue is present in 2.07

Viewing 3 replies - 1 through 3 (of 3 total)