Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #225760

    Hi, I have created a blog within a new website. If you click to read an article, The “Blog” title is in the mid – header area (along with breadcrumb on the right) and your article shows below. I would expect that when I click on ‘Blog’ in that header area I would go back to the main blog page but instead it takes me to the home page. This is not how the headers act anywhere else on the site, only on the article pages.

    I’d post a link but am trying to keep from Google indexing the site until we are finished and don’t trust that my robots.txt will be enough as I’ve seen Google index things disallowed content by accident before. I hope I’ve provided a good enough description though. Thanks in advance.

    #226005

    Hey waterwalk!

    It should take you on the Blog page. Please reset the settings on Settings > Reading panel if you have any. You can use goo.gl to hide the actual url of the website. Post it here, we need to inspect the site.

    Best regards,
    Ismael

    #227231
    This reply has been marked as private.
    #227332

    Hey!

    Please post the login details here and set it as a private reply. Please set the frontpage on Enfold > Theme Options > Frontpage Settings then leave the “Where do you want to display blog?” option unselected. Don’t set the frontpage and the blog settings on Settings > Reading. Create a blog then insert the Blog Posts element.

    Cheers!
    Ismael

    #229770
    This reply has been marked as private.
    #231030
    #232338

    Nope. Unfortunately, this is how far I had gotten before. By making the ‘news/blog’ page the ‘blog’ setting it now overrides all the page settings for the blog. So you can see that the blog page no longer shows just the excerpt and read more link as I have set it to. It also is displaying every single post instead of just the posts from the blog category. So this is not going to work. I really need this to behave as any other blog page in WordPress would where I can set which category I want it to pull blog posts from and also show only excerpts and read more link. So I still need your help on this. Thanks.

    • This reply was modified 10 years, 8 months ago by waterwalk.
    #232400

    Hey!

    Yes, i understand the issue, one workaround would be to make a redirection, you can use this plugin (default blog > custom blog):
    http://wordpress.org/plugins/simple-301-redirects/

    Regards,
    Josue

    #232409

    Yes, I am aware of the plugin. It would not be my first choice to have to install a plugin for what should be regular wordpress functionality though. It seems like there needs to be edit to the code so that it behaves correctly. I can use the plugin but would request that this be a fix in future versions.

    #232468

    Hi,

    Found a better solution, open single.php and index.php and look for:

    $t_link = get_permalink($new);
    

    Replace it by this:

    $t_link = "_your_custom_blog_url_goes_here_";
    

    Regards,
    Josue

    #234291

    HI again,

    I tried that and changed it in both files but then it broke so that when I was reading a single post and clicked on the ‘blog’ header it went to a ‘404’ instead of the blog page. I also tried to turn off the ‘blog’ selection in the theme area but then it just went back to the old error (going back to the home page instead of the blog page). Hmmmm. Any other ideas? This seems like this should just be part of the regular functionality because that’s how wordpress works in general.

    #238081

    Hi!

    Please revert the change Josue suggested in his post and insert this code:

    
    add_filter('avf_title_args', 'fix_blog_page_title', 10, 2);
    function fix_blog_page_title($args,$id) {
    $pt = get_post_type( $id );
    if('post' == $pt){
    $blogpage_id = avia_get_option('blogpage')
    $args['link'] = get_permalink($blogpage_id);
    }
    return $args;
    }
    

    into the functions.php file of your child theme. If you don’t use a child theme insert the code into enfold/functions.php at the very bottom. Make sure that the blog page option is set on the theme option page (Enfold > Theme Options).

    Regards,
    Peter

    #241409

    Hi, sorry to take so long. It was a busy week. I tried this but got an error so I just want to correct one thing in case anyone else reads this post for the solution. The original code in previous post was missing a “;” on the second to last line so be sure to use the following instead. Otherwise, it works GREAT!!!! Thank you so much.

    add_filter(‘avf_title_args’, ‘fix_blog_page_title’, 10, 2);
    function fix_blog_page_title($args,$id) {
    $pt = get_post_type( $id );
    if(‘post’ == $pt){
    $blogpage_id = avia_get_option(‘blogpage’);
    $args[‘link’] = get_permalink($blogpage_id);

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Blog header goes to index instead of blog’ is closed to new replies.