-
AuthorPosts
-
February 18, 2014 at 9:55 pm #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.
February 19, 2014 at 8:27 am #226005Hey 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,
IsmaelFebruary 21, 2014 at 4:22 am #227231This reply has been marked as private.February 21, 2014 at 10:06 am #227332Hey!
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!
IsmaelFebruary 26, 2014 at 9:16 pm #229770This reply has been marked as private.March 1, 2014 at 11:07 am #231030March 4, 2014 at 6:12 pm #232338Nope. 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.
March 4, 2014 at 8:15 pm #232400Hey!
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,
JosueMarch 4, 2014 at 8:27 pm #232409Yes, 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.
March 5, 2014 at 1:57 am #232468Hi,
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,
JosueMarch 8, 2014 at 11:22 pm #234291HI 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.
March 15, 2014 at 4:57 pm #238081Hi!
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,
PeterMarch 21, 2014 at 11:04 pm #241409Hi, 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); -
AuthorPosts
- The topic ‘Blog header goes to index instead of blog’ is closed to new replies.