Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Forum: Plugins
    In reply to: Widgets per post plugin
    Thread Starter topsys

    (@topsys)

    Hi Josh,

    that was perfect, thank you so much.

    olaf

    I’m having the same problem and it also occurs with get_categories. What is really annoying is that the category shows up, even when hide_empty is set and all the posts in the category are drafts, meaning that it will just send you to a “sorry no posts” kind of page.

    Does anyone have a solution for this issue, it would be much appreciated?

    Hi rabidsquid,

    could you let me know which version of WordPress you are using, so that I can test this.

    Cheers,
    olaf

    Thread Starter topsys

    (@topsys)

    Hi Scribu,

    thank you very much for you quick reply and thank you very much for your awesome plugin.

    I will be looking forward to this update.

    Cheers,
    olaf

    Hi mptorriani,

    I need a little more information than that, what are the setting you have set, which are the video sites you have content from and which version of wordpress are you using.

    A link to the site where the plugin is installed would also be appreciated.

    Cheers,

    Olaf

    Thread Starter topsys

    (@topsys)

    Well I’ll keep pitching this subject every week, just so nobody forgets.

    If you have knowledge on this subject, please don’t keep it to yourself, you are more than welcome to share it here.

    I would love to see what you have done with it, to allow for locally hosted videos.

    Yeah, the images in IE are square because IE does not support the css property, but this is extra and can be changed by adding a stylesheet that overrides the default styles. This also goes for the opacity, though the opacity should work, since the stylesheet uses the IE filter.

    If or when you have the time, you are more than welcome to send be a copy of your hack to olaf at wpreso dot com. I will then test to see how your additions work and possibly implement them into future releases if it is ok with you.

    Hi,

    currently this is not possible, because I do not know where to look for the video thumbnail of locally hosted videos.

    I will try to look into adding support for a custom field, so that you may add your own thumbnail instead.

    /olaf

    Thread Starter topsys

    (@topsys)

    I was just wondering, now that people have had a week to think about the above, if anybody has something to share on the subject of nonce in theme options pages?

    Cheers,
    olaf

    Thread Starter topsys

    (@topsys)

    I figured out a way that works, now, while using the method below, I have my list of attachments for the post and am still able to post a comment to the post and not the attachment.

    Here is the database query code:

    global $wpdb;
    $attachment_ids = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post->ID' AND post_status = 'inherit' AND post_type='attachment' ORDER BY post_date DESC"); 
    
    foreach($attachment_ids as $aid) {
      echo '<li><a href="' . wp_get_attachment_url($aid->ID) . '">'. get_the_title($aid->ID) .'</a></li>'."\n";
    }

    My guess is that using the other database queries somehow changed the post id number which is passed when submitting a comment, thereby changing the location of the comment, even though it would still show up in the post, it was attached to the posts first attachment.

    Anyways, I hope this helps somebody else in the future.

    Thanks for all your help Ipstenu.

    /olaf

    cool, glad I could help.

    You should also have a look at category templates plugin, as it can help you in situations where you start using the posts for different situations, such as one category and sub categories for products, which need a product category template and one category for news, which needs a news template.

    Also you might want to have a look at flutter, which can really change the way you add pages and posts to wordpress.

    Last if you want multilingual sites, WPML is a good choice.

    There are many more, but with these 4 plugins you are well on your way to being able to do pretty much anything a normal cms will do.

    /olaf

    Thread Starter topsys

    (@topsys)

    sorry about the late reply, here are the two functions I have tried, both show a list of the attachments.
    The first one using get_children:

    $args = array(
      'post_type' => 'attachment',
      'numberposts' => -1,
      'post_status' => 'inherit',
      'post_parent' => get_the_ID(), // any parent
    );
    $attachments = get_children($args);
    if ($attachments) {
      echo "<ul>\n";
      foreach ($attachments as $post) {
        setup_postdata($post);
        echo '<li><a href="' . wp_get_attachment_url($post->ID) . '">'. get_the_title().'</a></li>'."\n";
      }

    and the second one using get_posts:

    $args = array(
      'post_type' => 'attachment',
      'numberposts' => -1,
      'post_status' => 'inherit',
      'post_parent' => get_the_ID(), // any parent
    );
    $attachments = get_posts($args);
    if ($attachments) {
      echo "<ul>\n";
      foreach ($attachments as $post) {
        setup_postdata($post);
        echo '<li><a href="' . wp_get_attachment_url($post->ID) . '">'. get_the_title().'</a></li>'."\n";
      }

    Both the get_children and the get_posts above are pretty much like the ones on the get_childrens function page and the get_posts function page on how to get attachments, so it should not be here that the problem occurs.

    /olaf

    Thread Starter topsys

    (@topsys)

    Hi Ipstenu,

    thanks for your reply.

    No, I just upload them inside a post and they automatically get attached to that post, then I use the get_children function to get the attachments for the specific post.

    /olaf

    Hi James,

    you can create a static page and set it as your front page in the settings -> reading tab, select the A static page radio button and under the front page drop down, select the page you created.

    Then you can create a template to use on the page you created to be your front page. Here is a little more on the subject of templates for wordpress.

    To create an advanced menu structure, you should look at the menubar plugin, there are others, but this one is very simple, yet very flexible and powerful.

    Even though it is a blogging platform, you can easily use it as a cms.

    /olaf

    Hi winnerz,

    do as plovs said, except select the header.php file instead of the footer.php.

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