Forum Replies Created

Viewing 15 replies - 76 through 90 (of 449 total)
  • Thread Starter Alkorr

    (@alkorr)

    Great news then, thank you James! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Hi David, nope, it’s not a Post Type per se, it’s a Category. And since the Search box is in my Archive.php page, the ‘value’ should be dynamic to search in the Books category when showing the Books archive posts, same for Movies, etc…

    Thank you for you help 😉

    Thread Starter Alkorr

    (@alkorr)

    I replaced:

    <?php home_url(); ?>

    by:

    <?php echo esc_url( home_url( '/' ) ); ?>

    Now my Search from the 404 Page works fine, but the Search I used to make from the Books category (/books/) is now made from the whole website but I want it to still be only from the the Books category.

    I think it should have something to do with getting the current_page_url() but it doesn’t work when I add this parameter :\

    Any idea? I’m doing my best to find the solution by myself, I’m trying but a little help is always welcome! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Hi David, thank you for your reply. Unfortunately my blog is offline for now but it was a problem I also encountered with my previous theme…

    I have another problem (but surely related) when I’m on the 404 page (www.mywebsite.com/bookz/ instead of http://www.mywebsite.com/books/). When I do a search for Hemingway from this 404 error page, despite of showing all the results for Hemingway (there are plenty!) it returns ‘0 post found’ and the URL is http://www.mywebsite.com/bookz/?s=Hemingway instead of http://www.mywebsite.com/?s=Hemingway&#8230;

    I know you’re kind of blind here but what do you think it could be? I searched on Google and the WP Forums and couldn’t find anything :\

    In case it helps, here is my search box:

    <form role="form" id="searchform" method="get" action="<?php home_url(); ?>">
    <div class="input-group">
    <input type="text" name="s" id="s" class="form-control" placeholder="Search..." >
    <span class="input-group-addon">
    <button type="submit">
    <span class="glyphicon glyphicon-search"></span>
    </button>  
    </span>
    </div>
    </form>

    Thank you for your help! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Steve, I think you’re right, indeed… So I tried to redirect the page via .htaccess but it doesn’t work.

    I thought it could be easy to do but now I think I’m stuck <:)

    Thread Starter Alkorr

    (@alkorr)

    I didn’t use a Plugin (I installed one and then removed it) because I preferred to add some code to my functions.php.

    function add_taxonomies_to_pages() {
     register_taxonomy_for_object_type( 'post_tag', 'page' );
     register_taxonomy_for_object_type( 'category', 'page' );
     }
    add_action( 'init', 'add_taxonomies_to_pages' );
     if ( ! is_admin() ) {
     add_action( 'pre_get_posts', 'category_and_tag_archives' );
     
     }
    function category_and_tag_archives( $wp_query ) {
    $my_post_array = array('post','page');
     
     if ( $wp_query->get( 'category_name' ) || $wp_query->get( 'cat' ) )
     $wp_query->set( 'post_type', $my_post_array );
     
     if ( $wp_query->get( 'tag' ) )
     $wp_query->set( 'post_type', $my_post_array );
    }

    It works fine but unfortunately, the permalink doesn’t work like I would like.

    And yes, I set up my permalinks to include categories:

    /%category%/%postname%/

    I tried to use .htaccess to redirect:

    myblog.com/concerts

    to:

    myblog.com/category/music/rock/concerts

    But it doesn’t work neither… 🙁

    Thread Starter Alkorr

    (@alkorr)

    Hi Steve, thank you. But I already installed a plugin to add Categories to Pages and it doesn’t do what I want, even if I add the Categories, the permalink of the page will still be :

    myblog.com/concerts

    and not:

    myblog.com/category/music/rock/concerts

    Thread Starter Alkorr

    (@alkorr)

    Hi thaikolja, sure. Let’s say my secondary titles usually contain 60 to 80 characters, but to fit my homepage design, I need to show shortened secondary titles (only 30 characters), how can I do that? It is possible to do it for Post Titles (there are plenty of snippets and plugins) but I have no idea how to do it with your plugin.

    Hope it helps 🙂

    Alkorr

    (@alkorr)

    Hi, thanks say_hello for bringing this topic because this is something I would like to be able to do as well. I’d like to use this plugin a different way, to turn it in some kind of as ‘favorite’ plugin so readers would know what are my favorite posts. And to do that, I have to be able to add ratings myself, from the backend (but readers are also welcome to rate the posts as well). For example, only Admin should always be able to add ratings on posts from the backend.

    That would be an awesome feature allowing both. Thank you Harish for your great work on this plugin! 🙂

    • This reply was modified 9 years ago by Alkorr.
    Thread Starter Alkorr

    (@alkorr)

    Thank you very much Jared! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Thanks for your reply Tom! I checked the Pro Version of your plugin, it offers a lot of additional features, it’s great and I may consider buying it for my next pro projects. But for my very personal, small blog, I wouldn’t pay for all these features while I only need one of them, the menu to be sticky… I understand it’s fair to pay for additional features when they are truly important and add new functionalities but I don’t think the sticky feature would be important enough to make people pay for solely for it. Your plugin is already awesome, and free, so I’m absolutely not telling you what you should do or not, but new icons and search bar are features to be paid for, but the sticky feature, I’m not so sure.

    This is my humble opinion, thanks again for your great work on this plugin, and your quick response, much appreciated!

    Thread Starter Alkorr

    (@alkorr)

    Hi Martin, so it is linked to the length of the tweet? I’ve read the thread (I always check the forum before asking a question) but I thought it was something else…

    Ok, then, thank you!

    Thread Starter Alkorr

    (@alkorr)

    Hi, it works great, thank you both very much for your help! 🙂

    Thread Starter Alkorr

    (@alkorr)

    Hi Michael, thanks for your help but it doesn’t work, the query breaks my page, it’s all blank now…

    Here’s my code:

    <?php $args = array( 
    	'posts_per_page' => 2,
    	'post__not_in' => get_option( 'sticky_posts' ),
    	'meta_key' => '_thumbnail_id', 	
    	'meta_compare' => 'NOT EXISTS') 
    
    $no_featured_image = new WP_Query( $args );
    while ( $no_featured_image->have_posts() ) : $no_featured_image->the_post();
    ?>
    
    My text
    
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    I don’t know what’s wrong… 🙁

    • This reply was modified 9 years, 6 months ago by Alkorr.
    • This reply was modified 9 years, 6 months ago by Alkorr.
    Thread Starter Alkorr

    (@alkorr)

    It works fine, thank you very much wppatrickk! 🙂

Viewing 15 replies - 76 through 90 (of 449 total)