Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • This may be the same issue I am having so instead of starting a new support thread I’ll post my question in here in hopes someone can please help me?

    Every time I post a blog posts url into a Facebook page the posts title doesn’t come up only my blog’s title. Also no description or content from the post shows up on Facebook only my post details. For example, try posting this link to your facebook and you’ll see what I mean: https://www.shaunburkowski.com/blog/is-it-worth-buying-old-movies-for-blu-ray-to-watch-on-your-hdtv/

    On facebook the POST title should be shown NOT the blog title, etc. Is this related to the bugs as mentioned above?

    I’m not a strong coder so any feedback for a novice would be very helpful.

    ps. I have several other sites that are not running the Yoast SEO plugin and are not having the same issue so I strongly believe it is related to this plugin. I tried deactivating this but I believe the WP code has been modified and simply deactivating the plugin did not resolve the issue.

    Thread Starter sburkowski

    (@sburkowski)

    If I’m understanding correctly these are the steps?

    1) I create the category.php file by duplicating my archive.php file

    2) in the new category.php file I change the code <?php get_sidebar(); ?>

    to

    <?php
    if (is_category()){
      $current_cat = intval( get_query_var('cat') );
      get_sidebar($current_cat);  //for category Hall get sidebar-hall.php
    }
    ?>

    And that’s it? My theme will recognize the new category.php file?

    Thread Starter sburkowski

    (@sburkowski)

    Slight correction to the above post…

    In my archive.php file the code for the sidebar is

    <?php get_sidebar(); ?>

    and in the page.php its

    <?php include(TEMPLATEPATH."/sidebar.php");?>

    But now that I think about it I’m guessing the archive.php is where the code change needs to happen? I don’t see anything referring to a ‘category template’ in my templates files within the theme editor?

    Thread Starter sburkowski

    (@sburkowski)

    First off, Michael and Anne THANKS!!! ?? I really appreciate the help and advice!

    Second, if I’m understanding correctly I would duplicate my sidebar.php file and rename the duplicate to something like sidebar-hall.php and customize that for the category ‘hall’.

    Then I would go into my page.php template or archive.php (I’m not sure which?) and change the following code:

    <?php include(TEMPLATEPATH."/sidebar.php");?>

    To this instead…

    <?php
    if (is_category()){
      $current_cat = intval( get_query_var('cat') );
      get_sidebar($current_cat);  //for category Hall get sidebar-hall.php
    }
    ?>

    Am I correct?

    Thread Starter sburkowski

    (@sburkowski)

    This might make it easier to see what I’m trying to do.

    On this blog https://drivemileone.com there’s multiple dealership divisions… For example Hall, Heritage, MotorWorld, etc. When you click on those ‘categories’ it shows all the posts that have been categorized as Hall, Heritage, etc.

    I’d like to customize the sidebar that’s shown when inside each category… So for example I could have the facebook API or maybe links and ads specific to those categories (dealerships) showing up.

    There should only be 1 category selected for each post, but in the event there is multiple categories selected for a post I’d want to default to just the general sidebar being shown instead of one of the custom versions specific to the dealerships (like shown on the blog home page).

    I hope that makes sense?

    Thread Starter sburkowski

    (@sburkowski)

    Thanks Anne!

    Yes, I’m thinking separate sidebar files since I’m not that good at coding to be honest. Novice skills. I’d even prefer to have separate widgetized sidebars if I could figure out how to set that up?

    My main question is. Where would I insert the is_category conditional tag? Would that go at the end of the single.php where it says:

    <?php get_sidebar(); ?>

Viewing 6 replies - 1 through 6 (of 6 total)