Hiding categories from related/popular posts

resolved (18 posts) (4 voices)

  1. cazza
    Member

    How do I hide posts under a certain category (ie those with images to be used for the portfolio) from appearing under the Related & Popular Post Module?)

    If this can't be done, how do I control the size of the images inserted into these portfolio posts (the dimensions are 600x600 but I can't see where this may be changed or automated)

    Posted 1 year ago #
  2. MiguelGonzalez
    Member

    i used a combination of the YARRP plugin, Executable PHP widget plugin and Category Posts widget plugin - just search for them in the Wordpress plugin support area.

    Posted 1 year ago #
  3. Elliott
    Support

    Hello cazza,

    Download the attached file and extract to /wp-content/themes/infocus/lib/functions/

    This file will exclude posts from the category 'Portfolio'. If you need to change this category then let me know.

    If this does not work for you then you can also try MiguelGonzalez solution (thanks Miguel).

    Attachments

    1. custom-posts.zip (1.8 KB, 12 downloads) 1 year old
    Posted 1 year ago #
  4. cazza
    Member

    Thanks for this. The category used for the portfolio is actually called 'press', with an ID of 32. Can I change this somewhere? Otherwise I will use plugins though trying to avoid having so many (thanks Miguel)

    Posted 1 year ago #
  5. Elliott
    Support

    Hey cazza,

    In the attached file find line 15 which looks like this..

    $catID = get_cat_id('Portfolio');

    And change 'Portfolio' to the slug of your category.

    Or you can change line 21 which looks like this..

    'cat'=> '-32'

    where 32 is the ID of the category you wish to exclude.

    Let me know if this works for you.

    Posted 1 year ago #
  6. cazza
    Member

    Did the first option but it hasn't worked. Doe I need to chanage the cat= line as well?

    Posted 1 year ago #
  7. Elliott
    Support

    Go ahead and change the second one, it could be that your category name has a different slug ID.

    Posted 1 year ago #
  8. cazza
    Member

    No luck. Still showing. Where is the option to control the size of the images inserted into the post (ie 600x600 bit)?

    Posted 1 year ago #
  9. Elliott
    Support

    Hello cazza, sorry for such a late reply.

    Just to make sure I understand here.. the portfolio image that gets inserted into the post (945 x 516) you wish to change this to 600 x 600?

    Posted 1 year ago #
  10. missingtoes
    Member

    Hi there,

    This didn't work for me either. I even went in and changed the slug of Portfolio to 'Portfolio', thinking it worked with slugs instead of category names. I also added the cat id on line 21 without much luck.

    Posted 1 year ago #
  11. Elliott
    Support

    Hello missingtoes,

    Before I take another look at this, are you using the widget or do you mean the module that appears below your posts?

    Posted 1 year ago #
  12. missingtoes
    Member

    Hi, Thanks for the response.

    In Screen3.png:
    I chose the categories of Portfolio for the stuff that goes in the Portfolio, along with whatever subcategory it belongs to.

    In Screen2.png:
    I clicked on the 'Portfolio' checkbox. This had the following effect in Screen1.png:

    1. Under Thoughts (Working title for the blog):
    This got rid of all the recent posts, which is what I wanted to happen. I'm happy with this.

    2. Recent Posts: I want to have Recent Posts as they relate to blog posts, but I don't want the portfolio categories to show up.

    3. I'm not referring to this bottom black part, but if you could tell me if there is a way to get rid of this stuff and only have the footer at the bottom that would be most appreciated!

    Attachments

    1. screen3.png (11.8 KB, 1 downloads) 1 year old
    2. screen2.png (17 KB, 1 downloads) 1 year old
    3. screen1.png (83.5 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  13. missingtoes
    Member

    As for #3, I found this link which fixed that part:
    http://mysitemyway.com/support/topic/how-to-hide-footer#post-1500

    Awesome.

    Posted 1 year ago #
  14. Elliott
    Support

    Hello missingtoes,

    You can select certain categories to exclude from your post listings.

    Navigate to Dashboard -> inFocus -> Blog and you can exclude your portfolio categories here. This will also exclude them from the recent posts / popular posts widgets. Let us know if this works for you missingtoes.

    Posted 1 year ago #
  15. missingtoes
    Member

    I think you might have missed it, but in screen2.png, I did in fact choose the category to remove them from the Recent Post. I'm reuploading it so you can see. I even added all the other portfolio-esque categories to the exclusion list, with no luck. What else could I be doing wrong?

    Thanks so much for your continued help!

    Best,
    Jonathan

    Attachments

    1. screen2.png (17 KB, 0 downloads) 1 year old
    Posted 1 year ago #
  16. Elliott
    Support

    Make sure you are using the "inFocus Recent Posts" widget instead of the default Wordpress "Recent Posts" widget. If it still does not work then PM us login details so we can take a closer look at your settings missingtoes.

    Posted 1 year ago #
  17. missingtoes
    Member

    Ok, I must have been really confused as to how this was working. I went and read the following thread:
    http://mysitemyway.com/support/topic/remove-recent-posts-from-a-page#post-3561

    Afterwards, I realized that I had the same set up as Kristin, so I added the InFocus widget and it fixed my problem. Sorry, I must have fallen off the turnip truck recently. : )

    Jonathan

    Posted 1 year ago #
  18. Elliott
    Support

    That's okay missingtoes, I should have noticed it earlier. Let us know if you have any other questions.

    Posted 1 year ago #

Reply

You must log in to post.

Myriad WordPress Theme
Myriad wordpress theme
Method WordPress Theme
Method wordpress theme
Fusion WordPress Theme
Fusion wordpress theme
Elegance WordPress Theme
Elegance wordpress theme
Echelon WordPress Theme
Echelon wordpress theme
Dejavu WordPress Theme
Dejavu wordpress theme
Modular WordPress Theme
Modular wordpress theme