Forum Replies Created

  • In reply to: Category Page


    This code could be added to your templates. The user would create a custom_query variable and values called “custom_query”. The parameters (values) of that variable would be additional WPQuery parameters. This additional code would read the variable on a page, parse the values, add the values to the WPQuery arguments.

    This example code would be placed before the ‘loop’ and before the WPQuery in the template.


    // rough code to use a custom_query value on a page to modify the WPQuery parameters
    // used in a page
    // this code should be placed before the loop that displays the poasts

    // any WPQuery parameter could be used in this code, as needed

    // this variable would be added to a "Category" page.

    // custom_query = contains the additional wpquery parameters
    // ex: custom_query = count=10&catid=12
    // would show 10 posts with the categoriy ID number of 12

    // code is added to the template just before the WPQuery is done

    // this part reads the custom_query values from the page
    $graphene_query_args = get_post_meta($post->ID, 'custom_query', true);
    // check for the parameters in the custom_query value
    if ($graphene_query_args != '') { // check if there are values

    switch (true) {
    // for each possible parameter, decode it an add it to the WPQuery array
    case (get_query_var('count')) : $count = get_query_var('count');
    $graphene_query_args = $graphene_query_args . "&count=$count";
    case (get_query_var('catid')) : $catid = get_query_var('catid');
    $graphene_query_args = $graphene_query_args . "&catid=$catid";
    // add more case commands for each possible query parameter
    // end of checking the values
    // add additional default WPQuery parameters used by default in the template

    // do the query based on the custom_query parameters


    I can send a dollar towards your ‘island retreat’…… <grin>


    In reply to: Category Page


    …except the “Kalin plugin” has been abandoned.

    How about a template that looks at a custom field that contains additional WPQuery parameters. This shouldn’t be too hard to add to the theme.

    This custom-query would just add to the current WPQuery in the existing templates. And it would be an excellent feature to add, since there don’t seem to be many custom-query plugins that work with themes.


    In reply to: Added google fonts in editor


    The Graphene theme seems to be close to my needs, especially in the Editor screens. With the TinyMCE Advanced plugin installed, the Editor screen looks to be similar to the published post.

    The WordPress add_editor_style seems to be the solution, if the theme supports it. If the theme’s main css is also placed in the editor-style.css, then add_editor_style will (according to what I have researched) use the editor-style.css in the editor screen. That should create an editor environment that is very close visually to the published post.

    If the theme could also ensure that any added fonts (via custom css or font-selection pages) also appeared in the editor-style.css file, then those fonts should also be available in the editor font dropdown (that is shown via the TinyMCE Advanced plugin.

    That combination should, if set up properly by the theme, plus the TinyMCE Advanced plugin, should get the editor screen to look very similar to the published pages.


Viewing 3 posts - 1 through 3 (of 3 total)
Do NOT follow this link or you will be banned from the site!