Forum Replies Created

Viewing 15 replies - 1 through 15 (of 30 total)
  • Thread Starter GhostPool

    (@ghostpool)

    Thanks for the response.

    It’s no so much the conditional statement that’s the issue, it’s the use of wp_redirect on the Events archive page that seems to be the problem.

    The only workaround I could find was to not use a redirect and use conditionals on the Events list template itself to load alternative content for logged out users.

    I actually see the opposite issue. If I resize the browser window the captcha disappears. This occurs in the Twenty Seventeen theme on the default WordPress login page. It looks like some JavaScript is firing that is removing the code. You can see this here: http://aardvarkdemo.staging.wpengine.com/wp-admin/

    • This reply was modified 7 years, 10 months ago by GhostPool.
    Thread Starter GhostPool

    (@ghostpool)

    Thanks!

    Thread Starter GhostPool

    (@ghostpool)

    Thanks Hector.

    Thanks for the code, but when I use it I receive the following error:

    WordPress database error: [Not unique table/alias: 'pvc']
    SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) LEFT JOIN wp_posts AS p2 ON (wp_posts.post_parent = p2.ID) LEFT JOIN wp_post_views pvc ON pvc.id = wp_posts.ID AND pvc.type = 4 LEFT JOIN wp_post_views pvc ON pvc.id = wp_posts.ID AND pvc.type = 0 WHERE 1=1 AND ( wp_term_relationships.term_taxonomy_id IN (21,31,33,34,42,43,44) ) AND wp_posts.post_type = 'page' AND (((wp_posts.post_status = 'publish') OR (wp_posts.post_status = 'inherit' AND (p2.post_status = 'publish')))) GROUP BY wp_posts.ID, wp_posts.ID ORDER BY pvc.count DESC, wp_posts.ID DESC LIMIT 0, 12

    Any ideas?

    Make sure you did not remove the version number reference from index.php e.g.

    define( 'OT_VERSION', '1.1.1' );

    All you need to do is refer to the index.php file that comes with the plugin in functions.php e.g.

    require_once (TEMPLATEPATH . 'option-tree/index.php');

    Then remove the references to the plugin directory from index.php:

    define( 'OT_PLUGIN_DIR', ...
    define( 'OT_PLUGIN_URL', ...

    And add this to functions.php:

    define( 'OT_PLUGIN_DIR', get_template_directory_uri() . '/lib/admin/inc/option-tree');
    define( 'OT_PLUGIN_URL', get_template_directory_uri() . '/lib/admin/inc/option-tree');

    Obviously replacing it with your own directory structure.

    Wow, this is excellent plugin Derek. I’ll add my +1 to this thread.

    I have managed to integrate the plugin into the theme so it doesn’t require activation via the plugin directory, all I need to know now is, is there a page I can insert my options code into in the following form for instance:

    array(
            'item_id' => $item_id,
            'item_title' => $item_title,
            'item_desc' => $item_desc,
            'item_type' => $item_type,
            'item_options' => $item_options,
            'item_sort' => $id
          )

    I tried adding something similar to where the Test Input field is inserted in class.admin.php, but it doesn’t seem to work. Is the plugin not capable of this type of customization in it’s current form?

    Thread Starter GhostPool

    (@ghostpool)

    Hi Rev.,

    I’ve tried both, but I can’t get either working in this context. I guess I’m missing something.

    Thread Starter GhostPool

    (@ghostpool)

    Finally got around to try out these things. I could not get the get_template_part method to work, the same problems still occurred (I was probably doing it wrongly).

    However I’ve used your filter/action method and it works just fine. Probably not the cleanest way of doing things, but it’s a solid fix that works for me. Thanks Mark.

    Thread Starter GhostPool

    (@ghostpool)

    I found this in another thread which could be the root of the problem.

    I did some debug and found out something interesting.
    I put at the end of the 404 template file a print_r($wp_query); and discovered that after clicking on the “next page” link on the first archive page, the posts_per_page variable is set back to the default value (that set on the admin settings page).
    In other words my setting of the posts_per_page variable written at the beginning of the archive template is completely ignored and somehow lost.
    Still I don’t know why this happens…

    It seems that the wp_query is executed before opening the archive template where there’s the “correct” custom posts_per_page value and so, considering the default value (higher than the custom one), page 2 is non existent and then 404 error is correct…

    I managed to solve the problem using a custom url rewrite rule (put on functions.php of my template) introducing the correct posts_per_page value directly on the query string at redirect and everything goes right. But this is not a solution as I hate to change 2 different files just to change the posts_per_page setting of the custom archive page. I think there should be another and hopefully better way to do this.

    This is the key. The custom query does work in category.php if you leave out the posts_per_page variable and specify it from Settings > Reading or if you set it to the same number as in Settings > Reading. But I need to specify it from the page itself. Do you know of any solution Mark.

    Thread Starter GhostPool

    (@ghostpool)

    Thanks David, but the issue is not with the pagination plugin. I removed that completely and returned back to the Older/Newer links and the problem still occurs.

    It’s definitely an issue with the query itself. This could be a bug as Mark also mentions. I’m pretty sure it was working just fine in 2.9.

    I’ll have to try and find a work around, possibly utilizing the new loop feature. If I do I’ll post the solution here.

    Thread Starter GhostPool

    (@ghostpool)

    I’ve tried all that David, but unfortunately no luck.

    Mark, I’m using 3.0.1, on this theme: http://ghostpool.com/wordpress/mammoth

    I’ve now tested my original query and your query in loop.php in the TwentyTen theme and the pagination works. This was expected since I can get it to work outside category.php on my own theme. I then tried it in category.php in the TwentyTen theme and the pagination does not work. Surely this is a bug with pagination in category.php with 3.0.1.

    Thread Starter GhostPool

    (@ghostpool)

    I’ve disabled all plugins and tried this on another theme and the problem still occurs. Do you do freelance work Mark – I’d be happy to give you my login details and pay you for your time?

    Thread Starter GhostPool

    (@ghostpool)

    You’re right of course, I’ve removed that redundant part.

    With your changes Mark, the exact same problem still occurs. The same query works within page.php though so I’m wondering if this is a bug with 3.0?

Viewing 15 replies - 1 through 15 (of 30 total)