Forum Replies Created

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter pnaj

    (@pnaj)

    Wow, have found an amazingly simple solution. In my custom pagination, I’m using ‘page’ as the GET var (as in ?page=2, etc). That word (page) seems to be the problem.

    On my test site, I changed ‘page’ to ‘pp’ and … the pagination works perfectly.

    Big thanks to keesiemeijer – your comment about ‘paged’ working as expected made me think of changing the GET var.

    Phew!

    Thread Starter pnaj

    (@pnaj)

    I’m sorry, this is probably not what you wanted to hear.

    You are right there! ??

    To be honest, I built this site some time ago and I can’t remember why I didn’t use the native loop. Will try that next.

    Thanks very much for your time today, I really appreciate it. And if I find a solution, I’ll post back.

    Cheers,
    Paul

    Thread Starter pnaj

    (@pnaj)

    But You do have pretty permalinks if your permalink structure is /%post_id%/%postname%/.

    Ah, I see what you mean. I thought you were referring to the ‘rewrite’ => array(‘slug’ => ‘yyy’) option of register_post_type().

    I’v tried to pare down the code to just what I think’s relevant …
    https://pastebin.com/bwjbG0k0

    Thanks again,
    Paul.

    Thread Starter pnaj

    (@pnaj)

    Hi again,

    For me, before 3.4.1, https://www.xxx.com/yyy/?page=2 didn’t get re-directed at all, and displayed the correct posts.

    Quick answers to your questions, though …

    Do you use the rewrite argument when you register the custom post type? Not for the two post-types that are having problems.

    Do you have a Page (post_type) with the same slug as /xxx ? No.

    Do you have a query on the loop of your custom post type archive? Yes. I could post the code if you thought it’d help.

    Cheers,
    Paul.

    Thread Starter pnaj

    (@pnaj)

    Wow, keesiemeijer, thank you very much for your detailed answer.

    I will go through each suggestion and come back when I’m done.

    And to fix the undefined indices … replace the function secondary_html_validate($input) (line 61) with …

    function secondary_html_validate($input)
    {
    $input[‘pages’] = intval($input[‘pages’]);
    $input[‘posts’] = intval($input[‘posts’]);
    if (!isset($input[‘inherit’]) || $input[‘inherit’] != 1) $input[‘inherit’] = 0;
    if (!isset($input[‘homepage’]) || $input[‘homepage’] != 1) $input[‘homepage’] = 0;
    if (!isset($input[‘media’]) || $input[‘media’] != 1) $input[‘media’] = 0;

    return $input;
    }

    Hi, To fix the first notice (has_cap() issue) … change the number 8 in the call to add_options_page() to ‘manage_options’ on line 84 .

    Thread Starter pnaj

    (@pnaj)

    Hi there.

    Thank you very much indeed – I hadn’t noticed I was using the wrong permalink tag (%post_name% instead of %postname%).

    Crazy that the site (still in dev at the moment) worked fine with the wrong tag – except for links inside the feeds.

    Still one thing I don’t understand, though. Using my (uncorrected) permalink and now the corrected one, links on the site *do not* actually show the post_id portion, whereas links in the feed do.

    Eg
    web link: http:/www.mydomain.com/about/
    rss link: http:/www.mydomain.com/1234/about/

    Both actually display the same page.

    Since these refer to pages, rather than posts, I would prefer the cut-down version in the feeds as well.

    Any ideas how I might fix this?

    P.

    PS. Just for others having a similar problem though, having fixed the permalink the feed itself didn’t change. I have to update each page manually before the feed gets the change.

    Thread Starter pnaj

    (@pnaj)

    Yup, definitely the editor. I’ve just edited the style.css file in a different program, re-saved it and other admin issues were fixed.

    Glad it’s not wp, or wp update.

    Will be disconnecting netbeans for a while!!

    P

    Thread Starter pnaj

    (@pnaj)

    Must be something like that that … a light went on when you mentioned that the error message wouldn’t normally mention the version. Will try and work out why it happened!

    Aah the joys of the web!

    P.

    Got to say again, esmi (and ipstenu), I really appreciate your help and thoughts.

    Thread Starter pnaj

    (@pnaj)

    No to both of those, but one possibility is that I use the netbeans IDE which syncs with the server … I updated that a few days ago.
    I noticed that some files, not all, had extra linebreaks added!

    So, for example …

    Description: Child theme for the Twenty Ten theme
    Version: 1.0
    Author: pnaj

    … became …

    Description: Child theme for the Twenty Ten theme

    Version: 1.0

    Author: pnaj

    Thread Starter pnaj

    (@pnaj)

    Hi Esmi,

    Well that’s possible. I only noticed the problem because I was creating a new page and the Page attributes didn’t display the ‘Template’ dropdown (after having just updated to 3.0.4). Chasing around, I then noticed the theme error message.

    I last created a new page about a week ago – so yes – possible. Can’t think what haappened though.

    Thanks again. P.

    Thread Starter pnaj

    (@pnaj)

    Hi again,

    Something seems to have happened to the files themselves. It’s like the line-breaks are being read differently than before or have been converted (somehow).

    Anyway, re-laid out the header in style.css (in same order as above) – replacing all line-breaks and it now works! Thanks to both of you – your comments got me right to the problem – however it was caused!!

    P

    Thread Starter pnaj

    (@pnaj)

    Hi Ipstenu,

    Yes – both parent and child folders.

    P

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