Forum Replies Created

Viewing 15 replies - 1 through 15 (of 21 total)
  • Dan Bissonnet

    (@asinglehumanbeing)

    @rigaud: If its logging you out when you update the settings, that sounds like a more complex issue.

    Have you tried disabling all other plugins first? It could be a conflict with something else that’s been updated.

    Forum: Fixing WordPress
    In reply to: Pages wont display
    Dan Bissonnet

    (@asinglehumanbeing)

    If it works with twentyten then it sounds like there might be a fault with the theme.

    Try replacing the page.php file in your theme folder with a fresh copy from of the original theme. If that doesn’t work, try a fresh copy of the whole theme and see if that works.

    You can also give it a try without any plugins. If it starts working, then re-enable them one at a time until it breaks – that will tell you what the culprit is.

    Dan Bissonnet

    (@asinglehumanbeing)

    No problem Joost. Thanks for making a great plugin!

    Dan Bissonnet

    (@asinglehumanbeing)

    Instead of deleting and re-installing the the test site, it’s probably better to just move the files out of the sub-folder and into the domain root.

    You may need to update your wp-config.php file by adding:

    define('WP_SITEURL', 'https://www.myclient.com');
    define('WP_HOME',  'https://www.myclient.com');

    after the database connection details. This tells WordPress that the site has moved location. The database details should stay the same.

    Forum: Fixing WordPress
    In reply to: Pages wont display
    Dan Bissonnet

    (@asinglehumanbeing)

    It could be a number of things: the first thing to try is to switch back to the default theme and check with that. If it’s still not working, try disabling any plugins in case of a conflict.

    Also, rebuild your permailinks by going to Settings -> Permalinks in the admin pages, choosing a format and then clicking on ‘Save Changes’. And maybe double check your .htaccess file in case there is anything non-standard in there.

    Hope one of those helps.

    Dan Bissonnet

    (@asinglehumanbeing)

    Use get_post_type_object('name_of_your_custom_post_type'). It should return the full post_type object as registered, including the array of capabilities.

    Dan Bissonnet

    (@asinglehumanbeing)

    The only option I can think of is to create a hidden ‘sum’ meta field that is automatically updated when the post is updated and then sort on that.

    There are a couple of action hooks you could use: update_post_meta & updated_post_meta which fire before and after updating the meta values. I would take a bit of coding but it should be hook into those and update the third ‘sum’ field when either of the other two are updated.

    Look in wp-includes/meta.php at the update_metadata function to get an idea of how those hooks work.

    Dan Bissonnet

    (@asinglehumanbeing)

    Ok, If you want an unordered list of the post titles, that’s a bit more complex.

    You might be best creating a separate category.php template in your theme directory where you can customise the layout in more detail.

    Here’s a basic category.php file https://wordpress.pastebin.ca/1940373. I haven’t tested it and you will need to do some styling to get it to look exactly like the example you linked to.

    Dan Bissonnet

    (@asinglehumanbeing)

    1) To remove category 7, you should just be able to do:
    <?php wp_dropdown_categories('exclude=7&show_option_none=Select category'); ?>

    2) It depends a bit on the theme you are using. You may have to edit the ‘archive.php’ file in your theme (or child theme). There will probably a call to the_excerpt() which you can either remove entirely (which will also change your tag, monthly, author archive pages) or filter it like so:

    <?php
        if(!is_category()) {the_excerpt();}
    ?>

    You may need to edit some of the other markup around it as well depending on how you want it to display.

    Dan Bissonnet

    (@asinglehumanbeing)

    No problem – glad you got it working.

    Dan Bissonnet

    (@asinglehumanbeing)

    Unfortunately it’s not possible to globally disable all sidebars in all themes without hacking the core files. When get_sidebar() is called, WordPress will always try to load a sidebar template, either from the current theme or wp-includes/theme-compat/sidebar.php if that fails.

    Of course, you can disable any widgets in the usual way if the theme is widgetized, but that may still leave empty mark-up on the page where the widget area is.

    Dan Bissonnet

    (@asinglehumanbeing)

    Google needs to be able to communicate with your site in order to authenticate properly – your server configuration may be preventing it.

    If it fails, then it’s probably easier to just choose ‘Manually enter UA code’ type the UA code from your Analytics account instead.

    Dan Bissonnet

    (@asinglehumanbeing)

    The plugin needs the UA tracking ID from Google so it can generate the appropriate code for your site.

    Just go to Settings->Google Analytics in the admin menu. Click ‘Click here to authenticate with Google’ and follow the instructions. Then you can choose which analytics profile you want to use.

    Dan Bissonnet

    (@asinglehumanbeing)

    Sorry – missed a semicolon. Try this:

    function my_post_title($posttitle) {
        if (is_single() || is_page()) {
            $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
        } elseif (is_404()) {
           $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
        } elseif (is_category()) {
            $posttitle = '<h2 class="entry-title">';
            $posttitle .= '<a class="alignleft" href="'.get_permalink().'">'.get_the_post_thumbnail(NULL, 'thumbnail').'</a>';
            $posttitle .= '<a href="';
            $posttitle .= get_permalink();
            $posttitle .= '" title="';
            $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
            $posttitle .= '" rel="bookmark">';
            $posttitle .= get_the_title();
            $posttitle .= "</a></h2>\n";
        } else {
            $posttitle = '<h2 class="entry-title"><a href="';
            $posttitle .= get_permalink();
            $posttitle .= '" title="';
            $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
            $posttitle .= '" rel="bookmark">';
            $posttitle .= get_the_title();
            $posttitle .= "</a></h2>\n";
        }
    
        return $posttitle;
    }
    add_filter('thematic_postheader_posttitle', 'my_post_title');
    Dan Bissonnet

    (@asinglehumanbeing)

    Ok, thanks. Looking at it, I think it’s probably better to put the thumbnail within the post title and then float it. Here’s a replacement for your function which should do the job. You won’t need any extra styling as the theme has an alignleft class which does the work for you:

    function my_post_title($posttitle) {
        if (is_single() || is_page()) {
            $posttitle = '<h1 class="entry-title">' . get_the_title() . "</h1>\n";
        } elseif (is_404()) {
           $posttitle = '<h1 class="entry-title">' . __('Not Found', 'thematic') . "</h1>\n";
        } elseif (is_category()) {
            $posttitle = '<h2 class="entry-title">';
            $posttitle .= '<a class="alignleft" href="'.get_permalink().'">'.get_the_post_thumbnail(NULL, 'thumbnail').'</a>'
            $posttitle .= '<a href="';
            $posttitle .= get_permalink();
            $posttitle .= '" title="';
            $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
            $posttitle .= '" rel="bookmark">';
            $posttitle .= get_the_title();
            $posttitle .= "</a></h2>\n";
        } else {
            $posttitle = '<h2 class="entry-title"><a href="';
            $posttitle .= get_permalink();
            $posttitle .= '" title="';
            $posttitle .= __('Permalink to ', 'thematic') . the_title_attribute('echo=0');
            $posttitle .= '" rel="bookmark">';
            $posttitle .= get_the_title();
            $posttitle .= "</a></h2>\n";
        }
    
        return $posttitle;
    }
    add_filter('thematic_postheader_posttitle', 'my_post_title');
Viewing 15 replies - 1 through 15 (of 21 total)