Rewrite Custom Post Type (CPT) Permalinks


add_filter( 'post_type_link', 'wpse16427_post_type_link', 10, 4 );
function wpse16427_post_type_link( $post_link, $post, $leavename, $sample )
{
	if(in_array($post->post_type, array('blog', 'news-article', 'action-funnel', 'bookmark','positon-camp')))
    {
        $authordata = get_userdata( $post->post_author );
        $author = $authordata->user_nicename;
        $post_link = str_replace( '%author%', $author, $post_link );
    }
    return $post_link;
}

How to add custom login and logout links in the wordpress navigation or menu programmatically ?

You can add this code to your active theme’s functions.php file. I would recommend you to use Child theme. The code checks if the user is logged in or not and if the current menu is the primary menu. Then, it adds the appropriate login or logout link to the menu items. The wp_login_url() and wp_logout_url() functions generate the URLs for the login and logout pages respectively. The __() function is used for translation purposes. You can modify the code to match your specific theme and menu requirements.

function add_login_logout_link_to_menu( $items, $args ) {
    if (is_user_logged_in() && $args->theme_location == 'primary') {
        $items .= '<li><a href="'. wp_logout_url() .'">'. __("Logout") .'</a></li>';
    } elseif (!is_user_logged_in() && $args->theme_location == 'primary') {
        $items .= '<li><a href="'. wp_login_url() .'">'. __("Login") .'</a></li>';
    }
    return $items;
}
add_filter( 'wp_nav_menu_items', 'add_login_logout_link_to_menu', 10, 2 );

Toolset vs PODS: A Comprehensive Comparison

When it comes to customizing and extending the functionality of a WordPress website, choosing the right plugin can make a significant impact on the development process. Two of the most popular options available are Toolset and PODS. Both plugins offer a range of features that help simplify the custom post type creation and custom fields management process. However, each plugin has its own unique strengths and weaknesses, making it important to understand the difference between Toolset and PODS before making a decision.

Toolset

Toolset is a suite of plugins designed to make it easy for developers to create custom post types, custom fields, and templates. It offers a visual interface for designing custom post types, making it accessible for those who do not have a strong understanding of code. Additionally, Toolset offers a range of modules for specific needs such as forms, views, and maps. This makes it a powerful option for developers looking for a comprehensive solution for their custom WordPress development needs.

PODS

PODS is a plugin that allows developers to create custom post types, custom fields, and taxonomies. Like Toolset, PODS also offers a visual interface for designing custom post types, making it easy for non-developers to use. PODS has a robust set of features that make it a popular choice among WordPress developers, including the ability to create repeatable fields, advanced content types, and the ability to manage relationships between custom post types.

COMPARISON

When comparing Toolset and PODS, it is important to consider the specific needs of a project. For those looking for a comprehensive solution, Toolset is the better option as it offers a wider range of modules and features. However, for those who are only looking for custom post type creation and custom fields management, PODS is a more straightforward solution that can still deliver great results.

In terms of ease of use, both Toolset and PODS offer visual interfaces that make the custom post type creation process simple and straightforward. However, Toolset’s comprehensive range of modules may prove overwhelming for some users, whereas PODS has a more streamlined interface that is easier to navigate.

Another important consideration is the cost. Toolset is a premium plugin and requires an annual subscription, whereas PODS is a free plugin. For those on a tight budget, PODS is a great option as it offers a good range of features for no cost. However, for those who need the additional features offered by Toolset, the investment may be worth it in the long run.

CONCLUSION

Choosing between Toolset and PODS ultimately comes down to the specific needs of a project. Both plugins offer great solutions for custom post type creation and custom fields management, but Toolset offers a wider range of modules and features that may be necessary for larger and more complex projects. On the other hand, PODS is a straightforward solution that offers great value for those on a budget.

Regardless of the choice, both Toolset and PODS are powerful plugins that can greatly simplify the custom WordPress development process. By carefully considering the specific needs of a project, developers can make an informed decision and choose the plugin that best meets their needs.

How to create a Star Rating/Review/Feedback System with Toolset

This Module is purely built using Toolset

No other plugins are required

Required Toolset plugins

After you have all these plugins, then you need to go to main Toolset Import/Export menu and import the purchased ZIP file.

KEY FEATURES

  • Rating can be done only once by the logged in user for a particular post.
  • Ratings require admin approval. ( This feature can be adjusted according to the requirements)
  • Email is sent to the ADMIN email each time rating is submitted, admin can approve disapprove.

 

More features

  • Displays the stars according to the total calculated average
  • shows the average rating of a particular post
  • This shortcode can be used and customized html

Get this module at 50$

You will get a ZIP file of this module. You need to Install Toolset Module Manager and Import the ZIP.
Fill this form and complete the purchase.

This information will not be shared with anyone

Toolset Conditionals not working in Divi Theme Builder Latest Version

Most of the users are facing this issue where the Toolset conditionals have suddently stopped working in Divi Builder. There is a technical reason behind it.

So this is how conditionals were used earlier by most of you guys.

OLDER WAY OF USING WPV TOOLSET CONDITIONALS

[wpv-conditional if="( $(wpcf-3d-tour-toolset) ne '' )"]View 3D walkthrough[/wpv-conditional]

LATEST WAY OF USING WPV TOOLSET CONDITIONALS

[wpv-conditional if="( $(wpcf-3d-tour-toolset).item($current_page) ne '' )"] View 3D walkthrough[/wpv-conditional]

The reason why Divi is not supporting the old way is because they are not declaring the current post variable. So in order to fix it, we need this minor alteration to the conditionals.

I hope this is helpful for you. If you need any help in Toolset or WordPress Web Development, you can contact me here.