Search Results
If you want to display a Wordpress front page in a new or interesting way by splitting the categories into sections, or by not displaying certain categories at all then you can use the query_posts() function. This function comes as part of Wordpress and allows you to override the queries that are …
Article: Wordpress Category Post List
… All the function does is to get a list of categories and then for each category get a list of the posts associated with that category. Not much really, but useful in some circumstances. function getCategoryPostList($args = array()) { if (is_string($args)) { …
… { $links = []; $links[] = [ 'title' => 'Some title', 'url' => 'internal:/node/666', 'menu_name' => 'main', ] + … use Drupal\Core\Url; use Symfony\Component\DependencyInjection\ContainerInterface; … ->loadTree('category', 0, 2, TRUE); foreach ($terms as $term) { // Get URL of object. $term_url = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' …
Article: Extending The WordPress Page Walker
… at printing an intelligent list of WordPress pages in a previous blog post , but I wanted to revisit this topic and use the Walker …
Article: Custom Post Types In WordPress 3.0
… the Comments menu item. 'menu_position' => 30 menu_icon This is a URL to the image that will be used when your menu item is added to the … you might do something like the following. 'menu_icon' => WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . … rewrite Set this setting to false to prevent rewriting the URL of your custom content types. This setting can take an associative …
… in Wordpress one of the things I normally do right after installing a blog, before event getting started on the templates. However, I always …
… setting the feed URL to something like this. http://www.example.co.uk/category/example/feed This will allow you to display a page will posts …
Article: Create A Page Of Posts In Wordpress
… blog might be to create a page and display posts in a certain category on that page. This causes some pages to act very much like category pages. The first step in creating a page of posts is to create … with an array containing the categories to show, this can be a single category or multiple. This is then added to an $args array, which is …
… stores the taxonomy terms for an article. $fieldName = 'field_article_category'; /** @var \Drupal\field\Entity\FieldStorageConfig … method would be called like this, with a field called field_article_category on the article content type. $options = $this->getOptionsFromField('field_article_category', 'node', 'article', $account); The options list we create …
… Wordpress widgets are a way to customise the sidebar of your blog very easily and where included with the default Wordpress … widgetised theme all you need to do to change the menu system on your blog is drag and drop features and edit some simple parameters like heading. To include widgets on your blog you need a widget ready Wordpress theme. However, this isn't as …