문제

Let me first explain what I am wanting to do...

I am wanting to add all my hundreds of website bookmarks that I have now in my browser, into wordpress for the following reasons.

  • Can search my bookmarks by category
  • Can search my bookmarks by tags
  • Can search my bookmarks by description and/or name
  • Can access my bookmarks from anywhere
  • Can add a description to all my bookmarks
  • Can add a screenshot image if I choose to (least important idea)
  • Will have a custom template for viewing the bookmarks which will look different from a regular blog post/list

And what I have done so far...

  • Created a new post type "Website Bookmarks" with the code below

functions.php

<?php
/*
*  Add custom post type
*  name: website_bookmarks
*/

function bookmark_post_type()
{
    // Set some labels for our bookmarks post type
    $bookmark_labels = array(
        'name' => _x('Website Bookmark', 'post type general name'),
        'singular_name' => _x('Websiteite Bookmark', 'post type singular name'),
        'add_new' => _x('Add New', 'Websiteite Bookmark'),
        'add_new_item' => __('Add New Website Bookmark'),
        'edit_item' => __('Edit Website Bookmark'),
        'new_item' => __('New Website Bookmark'),
        'all_items' => __('All Website Bookmarks'),
        'view_item' => __('View Website Bookmark'),
        'search_items' => __('Search Website Bookmarks'),'not_found' => __('No website Bookmarks found'),
        'not_found_in_trash' => __('No Website Bookmarks found in Trash'),
        'parent_item_colon' => '',
        'menu_name' => 'Website Bookmarks'
        );

    $bookmark_args = array(
        'labels' => $bookmark_labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'query_var' => true,
        'rewrite' => array(
            'slug' => 'bookmark',
            'with_front' => false),
        'taxonomies' => array('post_tag', 'category'),
        'capability_type' => 'post',
        'has_archive' => true,
        'hierarchical' => false,
        'menu_position' => null,
        'can_export' => true,
        'supports' => array(
            'post-thumbnails',
            'thumbnail',
            'excerpt',
            'custom-fields',
            'editor',
            'title'
        )
    );

    register_post_type('website_bookmarks', $bookmark_args);
}

add_action('init', 'bookmark_post_type');

And then what I need help/ideas with...

This gives me a custom post type, so I can add my bookmarks as a post, and search them and all that good stuff, also lets me easily keep them out of my main blog loop, so I can keep them more private if I choose to. Also let's me easily create a template page just for the bookmarks.

Questions

  1. I would really like to be able to tag my bookmarks, many bookmarks will have more then 1 tag, example a site about PHP and MySQL and javascript, would be tagged with all 3 of those terms/tags. I know wordpress has tags built in already and I utilize it a lot on my current blog posts, should I add a NEW taxonomy ie. "bookmark_tags" because when a user views a tag page right now, it shows all my blog posts for that tag and I do not want a PHP tag page to show all my post's tageed with PHP and all my bookmarks tagged with PHP on the same page, so is the best method to create a new taxonomy called bookmark_tags?

  2. Same exact question as question number one (1), except in regards to Categories instead of tags?

  3. Any other Ideas or suggestions to improve my bookmarks section?


Thank you for any help

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 wordpress.stackexchange
scroll top