• Hi,

    Please refer to site I’m setting up at

    https://mefreeforall.org/wp

    I want the Jokes section in the Features panel to link to a page rather than a post as it does at present. Does anyone know how to do this?

    Help much appreciated,

    Tim C,

    Bristol, UK

Viewing 12 replies - 1 through 12 (of 12 total)
  • The Jokes actually links to a category (3), not a single post. If you post more items in category 3, they will show up when you click the link.

    Thread Starter denizente

    (@denizente)

    Thanks for reply. Trouble is I don’t want the jokes to appear on the front page as well (as the test one does at present under ‘latest story’). I want them to appear only when you clink the jokes link. Any ideas?

    Thanks for quick response.

    I think you can do what you want by adding a line in index.php just ahead of the query_posts call:

    $args['cat'] .= ($args['cat']) ? ',-3' : '-3';
    query_posts($args);
    Thread Starter denizente

    (@denizente)

    Thanks ,that sort of worked. It got the jokes onto the jokes section & away from the front page. Trouble is, when I try to post regular (ie non-joke) items on the front page it still puts them in the Jokes section.

    Do I have to take out the index.php code you kindly provided every time I want to make a front page post? seems a bit weird….

    Thx for all your help,

    TC

    If you duplicate the current category template as category-jokes.php (or category-3.php), this should allow the listings to only show jokes. Or am I getting the wrong idea of what you are after?

    J

    I am confused. The code I gave for index.php should not interfere with non-joke posts. It should only keep category 3 posts from appearing on the page.

    When I look at your site, it appears to be working.

    Thread Starter denizente

    (@denizente)

    Sorry for confusion vtxyzzy.

    Every time I add a new post intended for the front page now it only appears in the Jokes section, even though the Jokes category box is not ticked when I do it. If you look at last 3 items in jokes section they are all test posts meant for the front page that don’t appear there.

    Thanks for ongoing advice, much apprec.

    I don’t know what to say. Every one of those posts says ‘Posted in Jokes.’

    Take the code out and see if they still appear under Jokes.

    Thread Starter denizente

    (@denizente)

    I took the code out and posted a new one (test 5 Sept 2010). It appears in both jokes and front page with or without the jokes category ticked.

    The Category tickbox for Jokes in Edit Post doesn’t seem to work – every time I untick it and update, it just automatically ticks it again. I think this may be root cause of my problem.

    I would look for ‘add_filter’ somewhere in the theme code, probably functions.php, or maybe a plugin that is setting that category.

    Thread Starter denizente

    (@denizente)

    No plugins activated at all; cannot find add_filter in the code, though admittedly there is alot of code to look through. What do I do with it if I find it?

    If you can determine that it is adding the Jokes category, comment out the add_filter line.

    If you haven’t already done so, switch to the default theme to see if it is due to your theme.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Link to page from Front page post’ is closed to new replies.