WordPress.org

Ready to get started?Download WordPress

Forums

Post Tags and Categories for Pages
Blog sections no working in the right way (11 posts)

  1. amsterdamtourist.info
    Member
    Posted 10 months ago #

    Hi,

    I have installed your plugin. I have only one main issue.

    On my blog section (normally showing only posts) all pages and special url's (plugin Sinple URLs) are now listed in stead of only post items....

    Please have a look at: http://www.amsterdamtourist.info/news-blog/

    For the moment I have a "work-around" with a special shortcode from my theme displaying only certain posts with category "blog", but still I don't like to see all the others pages and URL's at the end of the blog page...

    How can I solve this?

    Kind regards,

    Jan

    http://wordpress.org/plugins/post-tags-and-categories-for-pages/

  2. curtismchale
    Member
    Plugin Author

    Posted 10 months ago #

    I'd guess that what your blog page actually shows is some sort of archive view and not the actual blog posts query.

    To facilitate search of the pages/posts that my plugin allows on categories I add pages as a post type to archive pages.

    So if your site is actually showing the archive view instead of the blog posts query it would add all the pages.

    Based on the little I can tell about your site you should have your reading settings (Settings/Reading) set so that the homepage is a page and should have a page (often I just call it Blog) set as the posts page.

    The plugin should work just fine under that standard configuration.

  3. amsterdamtourist.info
    Member
    Posted 10 months ago #

    Thx for the quick response! great!

    My homepage is ad widgetized homepage.

    I only have this problem when your plugin is enabled. When I disable the plugin, my blogsection works fine.....

    I also use a plugin called Simple URLs. Perhaps this plugin in combination with your plugin makes my blogsection a bit confusing?

    I asked the author of my WordPress theme (U-design) and he give my this answer:
    ---answer theme author---
    Looks like you might have a plugin conflict. For example, this link here ....(it's the link on my blogsection "I amsterdam city card")

    ... is a post as far as WordPress is concerned.

    You can see that it's post number#777723. Also, none of those CSS references are being generated by the theme, so you will want to how the plugin you are using to create those links is designed. Most likely it's creating some sort of custom post type which is being picked up as a post category for the blog page.
    ----end---

    Hope to hear from you soon and that you can help me on this one. I really like your plugin when it solves my problem ;-)

    Cheers, Jan

  4. curtismchale
    Member
    Plugin Author

    Posted 10 months ago #

    Do you have a link to the Simple URL's plugin?

    When I browse the source of your site I can see that your blog page uses a custom page template. Can you open your theme and paste the code (using something like https://gist.github.com/) and put the link to the full code from the custom page template here please.

  5. amsterdamtourist.info
    Member
    Posted 10 months ago #

    This is the link to Simple URLs plugin:
    http://wordpress.org/plugins/simple-urls/

    I don't underatdn what you mean by "Can you open your theme and paste the code (using something like https://gist.github.com/) and put the link to the full code from the custom page template here please."

    How can i do this? Dou you mean that I should go to my wordpress admin panel and then:
    1- appearance
    2- editor
    3- choose the blog template from my theme
    4- copy this en paste it into github
    5- sent you the github link

    Cheers, Jan

  6. amsterdamtourist.info
    Member
    Posted 9 months ago #

    Hi @curtismchale,

    Can you help me on this? I still have the same problem.

    Cheers, jan

  7. curtismchale
    Member
    Plugin Author

    Posted 9 months ago #

    Yup those are the steps so I can see the code but you need to make sure it's for the file that is your custom page template. It's probably page-Blog.php or something very similar.

  8. amsterdamtourist.info
    Member
    Posted 9 months ago #

    Hi,

    Here is the link:
    https://gist.github.com/anonymous/0d378d1d9e7c5c375ed6

    Cheers, jan

  9. curtismchale
    Member
    Plugin Author

    Posted 9 months ago #

    I see one fairly big issue that could be causing the pages to show on your blog page. You can see on line 62 there is the function query_posts. There is never a good reason to use that function and it can just 'blow up' on you pulling extra content when you don't want it to.

    Here is a long blog post (very developer centric) explaining why:
    http://developer.wordpress.com/2012/05/14/querying-posts-without-query_posts/

    I'd say talk to the theme author and get that removed/done right and then we can come back and try and figure out the conflict if it still exists.

  10. amsterdamtourist.info
    Member
    Posted 9 months ago #

    Hi,

    I asked the theme author to look into this topic. He answered:
    -----------
    "Nope, what the plugin developer suggested didn't fix it, I didn't think so but I had to try anyways, here you can see that now I had changed the query to a custom query: "
    --> Link to image: http://dreamthemedesign.com/u-design-support/uploads/FileUpload/16/13396.png

    -----------

    Is there any other solution from your side to solve this?

    Otherwise I have two other options:

    1) Use a page/post as blog section with a shortcode calling for post/pages with a category called "blog"
    --> But this is not how wordpress should work.... ;-)

    2) Disable and delete your plugin and change all pages to posts so I can use categories and tags for posts..

    Cheers, Jan

  11. curtismchale
    Member
    Plugin Author

    Posted 9 months ago #

    I took a look through my plugin again and the only queries it's changing are ones that are already trying to pull a tag or a category.

    So the 'bug' is that the theme excludes the portfolio category which triggers the query modifications I make since it calls the 'cat' parameter.

    That means this is a conflict between what my plugin does and what the theme accomplishes.

    I can add a conditional to exclude the pages from showing on your blog page but this would but this is only going to catch the issue for your theme in a very specific case.

    I would think that changing the custom query to a pre_get_posts filter might clear up the conflict. Basically we just want the cat exclusion to be set after my filter adds all posts to the query.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.