Default post type doesn’t display in url

My site currently has an opinions page which displays opinions posts (/opinions/). The post pages are only showing as /post-title/ when I need /opinions/post-title/. Code below, changes the default post type to “opinions”. public function revcon_change_post_label() { global $menu; global $submenu; $menu[5][0] = ‘Opinions’; $submenu[‘edit.php’][5][0] = ‘Opinions’; $submenu[‘edit.php’][10][0] = ‘Add Post’; $submenu[‘edit.php’][16][0] = ‘Opinion Tags’; … Read more

Is it posible to translate a url prefix?

I use a prefix in my url using “add_permastruct” in my functions.php: www.mydomain.com/the_prefix/my_category/postname But I would like to translate “the_prefix”. For example, if my site is in english, I will use the prefix “articles” and If my site is in german I will use “artikel”. English: www.mydomain.com/en/articles/my_category/postname German: www.mydomain.com/de/artikel/my_category/postname Any ideas? I use WPML plugin … Read more

How to get category slug link? ( include parent categories)

for example, if main category slug is cars; sub-category slug is: Ford; how to get the permalink of Ford, including its parent categories’ slug? ( get_category_link() returns mysite.com/?cat=19 type of link, but i want mysite.com/cars/ford ) Answer my solution: $catid=’24’ $cats = get_category ($catid); if ($cats) {$category_link = $cats->slug; if ( $parent = $cats->parent ) … Read more

Wp-theme Development

<?php query_posts( array( ‘category_name’ => ‘notice’, ‘posts_per_page’ => 1 ) ); while ( have_posts() ) : the_post(); echo ‘<h1>’,'<a href=”<?php the_permalink(); ?>”>’; the_permalink(); the_title(); echo ‘</a>’,'</h1>’; echo ‘<p>’; the_content(); echo ‘</p>’; endwhile; wp_reset_query(); ?> When I click this heading, My post not showing on single.php what is the problem? Sorry for my bad English. Answer … Read more

Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. Can you upload it somewhere or send to … Read more