I'm a WP rookie, and I just designed a static homepage that shows the 3 most recent posts in my database. I would like to redirect the user to another page in order to show him the entire blog post everytime a post title gets clicked. I already created my blog page using the reading settings menu but I can't figure out how to link each post to my blog page and show it's content on it. Any indications?
It wasn't doing this before, and I'm not sure what has caused this to change. I have tried: clearing cache changing permalink structure, saving, and setting back again unpublishing and republishing So far nothing has worked. The blog post shows up on the /blog page, however when I click on the 'read more' link, it redirects to the home page. If I try navigating directly, it will also navigate to the home page.
I'm new to WordPress. I am looking for a way to check if current page is the blog page in the code of the header file. I've checked but I can't find a way. Help me, Pls.
I have made some changes to a blog page and excluded some categories. However, whenever I view the blog online the excluded posts still appear. But when I got to the blog page and click 'preview' the excluded categories do not appear, as I wanted. I have cleared my browsers cache but this does nothing. There are no cache plugins in use. Does anyone know what's going on? Test Site: http://crankit.com.au/~dentalwe/blog/ function genesis_do_loop() { if ( is_page_template( 'page_blog.php' ) ) …
I can't find out the option of published date or modified date on my blog post. I write the this code <?php echo get_the_date() ?> but can't display the date. this is my blog post where I try to display the published or modified date. My website Link: www.applavia.com
I have multiple post page using custom post type and all post type have more categories and sub categories So i need to display particular categories specific and categories specific to post type Example Post A category1 subcategory11 subcategory12 category2 subcategory21 subcategory22 Post B category3 subcategory31 ........ subcategory32 category4 subcategory41 subcategory42 and so on so if i go to post A page category1 category2 and so on so if i go to Category 1 page i need to display only …
Custom post type name is "project". I need code in functions.php This is working for search: // Exclude custom post type from WP Search add_action( 'init', 'update_my_custom_type', 99 ); function update_my_custom_type() { global $wp_post_types; if ( post_type_exists( 'project' ) ) { // exclude from search results $wp_post_types['project']->exclude_from_search = true; } } I can not find a solution for /blog page.
After the update to the new WordPress version, "Blog pages show at most" (Setting >> Reading) is not working. Even if I change the count as 5 there, the homepage shows 10 articles i. It is not changing even I change to any count. For more information, I have two blogs that have the same theme and same WordPress version. One blog has 150 articles, and the other has 300 articles. 300+ article blogs faced this issue. Are there any …
In the .htaccess file, I am trying to write a 301 to catch any broken blog page links to redirect to the blog archive page? so something like Redirect 301 /blog-archive/category/{any 404} /blog-archive/
I have been struggling with a problem, I have a webpage running on WordPress, most of the things work as expected, except one: in the blog section page (the one that is configured in settings/reading -> Posts page), all posts are shown. I have a specific category that should be presented there, but I don't know how to alter the loop to work as expected. Here´s the code of the index page: <?php $class_archive = ''; $is_grid_layout = get_theme_mod( 'thim_front_page_cate_display_layout', …
I use a static page (Blog) to display the latest posts. I want to show the excerpt of that page next to the title. However, wen I use wp_kses_post( get_the_excerpt() ), I get the excerpt of the latest post from the post archive loop. I also tried with wp_kses_post( get_the_archive_description() ) but it also does not seem to work.. Any idea how this can be done?
I can't find any themes that truly match what I want, so I wanted to customize my blog page by adding to its existing layout given from the theme. However it seems that widgets and plugins that allow complete design and customization of pages work for everything (pages and posts) except for the blog page, which seems to be a completely unique type of page that cannot be customized without picking a new template. Does anyone know of a way …
How to stop featured image thumbnail [set as background image] on blog index page just repeating same image across all posts: i have this code here: add_action( 'wp_head', 'set_featured_background', 99); function set_featured_background() { if ( has_post_thumbnail() ) { $featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'full'); ?> <style> .has-post-thumbnail { background-image: url('<?php echo $featured_img_url ?>'); background-size: 100% 100%; } </style> <?php } } And ive tried a few different variations but it always jsut finds the most recent posts image and uses that across all …
On my single blog pages at the very beginning, I have the html <h6 class="entry-category is-xsmall"> <a href="www.website.com" rel="category tag">category title</a></h6> I want to remove the h6 tag from all blog pages. In this forum, I found a solution for removing the h3 at the comments: function my_comment_form_before() { ob_start(); } add_action( 'comment_form_before', 'my_comment_form_before' ); function my_comment_form_after() { $html = ob_get_clean(); $html = preg_replace( '/<h3 id="reply-title"(.*)>(.*)<\/h3>/', '<p id="reply-title"\1>\2</p>', $html ); echo $html; } add_action( 'comment_form_after', 'my_comment_form_after' ); I tried to …
Hi everyone I hope you have a great day, I was wondering if is there anyway I can call the year once?. I really don't know if its possible to call the date once cause mine keeps on repeating calling the year for every each post I have and here's the picture below what the output should look like and here's a copy of my code <div class="common_wrapper"> <?php if(have_posts() ): while(have_posts () ): the_post();?> <div class="wrapper_100"> <div class="width_30"> <h2><?php …
I am trying to get latest from specific categories (3 posts), but the code does not seem working. Instead of displaying posts from the mentioned categories, it is displaying posts from the first category. Here is my code: <?php do_action( 'hitmag_before_content' ); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <h1>Latest News</h1> <?php do_action( 'hitmag_before_blog_posts' ); ?> <?php $args = array( 'post_type' => 'post' , 'orderby' => 'date' , 'order' => 'DESC' , 'posts_per_page' => 3, 'category' => '30','33','1', 'paged' …
I'm working on a school website. The design calls for a collection of largely static pages, but for each class to have a blog which will be updated every few days. I know nothing about WordPress or PHP (thought I have development experience on other platforms) but I got the static bits of the site, based on a custom theme, up without too many problems. I set up a page for each class blog but I really wanted the authors …
I am trying to set up a website with askme as the main template and consider myself as someone who dosent knows website coding yet.And so I am using Wordpress to build a website.But the only problem I am facing is that my blog and home page are showing the same contents that of home page.I want the home page to be showing the summary questions of my website, which it is doing but my blog page instead of showing …
I am trying to get a carousel slider from the Revolution Slider Addon into the header on the homepage only. And I want it under the header bar (where the menu is). However, the template I'm using doesn't inherently support the slider. So I decided to go into the header.php and input the code myself to put the slider over the top of the default header image. However, when I do this, it also puts the slider in the header …
WordPress version: 5.4.1 I've built a plugin that includes a shortcode. The shortcode shows a product listing and has a couple of filters. The filters trigger a page refresh through JS with query params for the filter values. If I use the shortcode on any other page than the homepage, it works fine. If I add the shortcode to the homepage and apply a filter, somehow the blog homepage is shown instead of the regular front page. (Breadcrumbs show Home …