Forum Replies Created

Viewing 15 replies - 31 through 45 (of 56 total)
  • Forum: Plugins
    In reply to: Add_action in plugin
    Thread Starter Luigino

    (@luigino)

    Hello again everyone…

    you can see the source code, which I explained my issue in last post, here:

    That means it looks like it doesn’t send at all the admin_notices event to the wordpress and I haven’t got why…

    Any suggest?
    Thanks again everyone in advance!!

    Ciao,
    Luigi

    Forum: Hacks
    In reply to: Subscribers and categories
    Thread Starter Luigino

    (@luigino)

    I investigated a bit and I found after assigning a custom role to user, ad then going inside user’s profile as admin I see something like this:

    Role possibilities
    Wordpress Role assigned: MiddleSchool
    (contains Guest, ElementarySchool, Subscriber)

    so if I log in as that user I still see elementary’s school posts…how I can REMOVE those Guest and ElementarySchool roles from that user?
    Thanks in advance to all

    Ciao,
    Luigi

    Forum: Hacks
    In reply to: Subscribers and categories
    Thread Starter Luigino

    (@luigino)

    HI Gisha and everyone,

    in fact, following your suggest about a Role manager I installed Capability Manager and Role Scoper plugins, then I created two new roles, elementary and middle, which I assigned those categories for elementary school to elementary role and same thing for middle school to middle role.
    Then I assigned to a new user the role middle school while I have some posts for elementary school then I checked in Users profile page to see if that new user has only those categories assigned.
    So I logged as new user but I see in the frontend also elementary school posts…wonder why or what is not working… maybe I have to modify something in the default loop code in index.php page?…

    Thanks in advance to all!
    Ciao,
    Luigi

    Thread Starter Luigino

    (@luigino)

    Nevermind… I implemented my own plugin to manage it…

    Thanks anyway
    Luigi

    Thread Starter Luigino

    (@luigino)

    Nevermind….solved!
    Thanks anyway!!

    Ciao
    Luigi

    Thread Starter Luigino

    (@luigino)

    Nevermind…. solved!
    Thanks anyway

    Ciao!
    Luigi

    Thread Starter Luigino

    (@luigino)

    Up…

    Thread Starter Luigino

    (@luigino)

    No suggests/ideas?….

    Thanks in advance to everyone
    Ciao
    Luigi

    Thread Starter Luigino

    (@luigino)

    Hello again everyone…..

    I tried to modify with this code:

    if (is_page_template()) :
    	$pageposts = $wpdb->get_results("SELECT p.*
    									 FROM $wpdb->posts p, $wpdb->terms t, $wpdb->term_taxonomy tt,
    										  $wpdb->term_relationships tr, $wpdb->terms t2, $wpdb->term_taxonomy tt2,
    										  $wpdb->term_relationships tr2, $wpdb->postmeta meta
    									 WHERE p.id = tr.object_id
    									   AND p.id = meta.post_id
    									   AND p.post_status = 'publish'
    									   AND t.term_id = tt.term_id
    									   AND tr.term_taxonomy_id = tt.term_taxonomy_id
    									   AND p.id = tr2.object_id
    									   AND t2.term_id = tt2.term_id
    									   AND tr2.term_taxonomy_id = tt2.term_taxonomy_id
    									   AND (tt.taxonomy = 'category' AND tt.term_id = t.term_id AND t.slug = 'category-description')
    									   AND (tt2.taxonomy = 'post_tag' AND tt2.term_id = t2.term_id AND t2.slug = 'rassegna_stampa')", OBJECT);
    endif;
    ?>
    <?php if ($pageposts) : foreach ($pageposts as $post) : setup_postdata($post);
    	echo '<div class="category_description">'; if ( in_category('24') ) the_content(); echo '</div>';
    endforeach; ?> 
    
    <div class="navigation">
    	<span class="previous-entries"><?php next_posts_link('Articoli precedenti...') ?></span><span class="next-entries"><?php previous_posts_link('Articoli successivi...') ?></span><br />
    </div>
    
    <?php else : ?>
    	<span class="center">Mi dispiace, ma non sono presenti articoli in questa pagina.</span>
    <?php endif; ?>

    which it works about filtering correctly…. but how I can add paging showing 6 posts per page and showing links “next entries” and “previous entries”?….

    Thanks everyone in advance for your little help!!!
    Ciao
    Luigi

    Thread Starter Luigino

    (@luigino)

    I have a category with id=24 and some posts that have different tags with ID=59,44,12 and I’d like to extract posts from that category filtering them getting only id=59… so I did:
    $args=array(
    ‘category__in’=>array(24),
    ‘posts_per_page’=>6,
    ‘caller_get_posts’=>1,
    ‘tag_id’=>59,
    ‘paged’=>$paged
    );

    query_posts($args);

    then I load the page but it extracts all the posts of that category… why?… I tried also with ‘tag__in’=>array(59) but same result…. I cheched if I could have wrong id of that tag but it’s right….
    At least what I can check to see if there’s something wrong, like in database?…
    Pratically I would understand how it works this tag_id/tag__in in the core of wordpress just to check what could be wrong….

    any suggest would be appreciated thanks!!! ??

    Ciao
    Luigi

    Thread Starter Luigino

    (@luigino)

    Uhm… no clue?…

    Forum: Plugins
    In reply to: How to get post tag?
    Thread Starter Luigino

    (@luigino)

    Ah there we go! Thanks a lot MichaelH….
    Last question…outside the index.php, in this case in a theme for a plugin, where I adopt the query_posts(…), I get this error:

    Use of undefined constant date – assumed ‘date’ in /home/binago/public_html/wp-
    content/plugins/mailpress/mp-includes/class/MP_Mail.class.php(247) : eval()’d code at line 17

    so I supposed it’s due for this:

    $today = getdate();
    $args=array(
    ‘category__not_in’=>array(24,44,127),
    ‘caller_get_posts’=>1,
    ‘year’=>$today[“year”],
    ‘monthnum’=>$today[“mon”],
    ‘day’=>$today[“mday”]-1,
    ‘orderby’=>date,
    ‘order’=>DESC
    );
    query_posts($args);

    precisely in the ‘orderby’=>date maybe outside the usual loop posts doesn’t work…what do you think? is there maybe an alternative for this ‘orderby’=>date?…

    Thanks
    Luigi

    Forum: Plugins
    In reply to: How to get post tag?
    Thread Starter Luigino

    (@luigino)

    but with $tags I get an Array…since each post has only one tag just to identify that post, how I can get the tag from $tags’s array?.. with $tags[0] it doesn’t return the tag….

    Thread Starter Luigino

    (@luigino)

    And why it does need to pass to $args this ‘paged’ parameter when next_post_link(…) should retrieve automatically n more recently chronological posts even if in templates but when they are just POSTS anyway?….

    Thread Starter Luigino

    (@luigino)

    Thanks MichaelH,

    now it works!!! it was that thing of $paged you suggested… what’s that $paged and get_query_var() for?… just a little explanation to understand..

    Thanks again, you saved me hours of work ??
    Luigi

Viewing 15 replies - 31 through 45 (of 56 total)